使用 Amazon Q Developer 搭配 AWS Glue Studio - Amazon Q Developer

使用 Amazon Q Developer 搭配 AWS Glue Studio

此頁面說明如何設定和啟用適用於 AWS Glue Studio Notebook 的 Amazon Q Developer。啟用後,Amazon Q 就可在您編寫 ETL 程式碼時自動提出程式碼建議。

注意

Amazon Q 同時支援 Python 和 Scala,這兩種語言可用來針對 AWS Glue Studio 中的 Spark 任務編寫 ETL 指令碼。

在下列程序中,您將設定讓 AWS Glue 搭配 Amazon Q 使用。

  1. 設定 AWS Glue Studio 筆記本

  2. 將下列政策附加至 Glue Studio 筆記本的 IAM 角色。

    注意

    codewhisperer 字首是與 Amazon Q Developer 合併之服務的舊名稱。如需詳細資訊,請參閱 Amazon Q Developer 重新命名 - 變更摘要

    JSON
    { "Version": "2012-10-17", "Statement": [ { "Sid": "AmazonQDeveloperPermissions", "Effect": "Allow", "Action": [ "codewhisperer:GenerateRecommendations" ], "Resource": "*" } ] }
  3. 開啟 Glue 主控台

  4. ETL 任務下,選擇筆記本

  5. 確認已選取 Jupyter 筆記本。選擇建立

  6. 輸入工作名稱

  7. 針對 IAM 角色,選取您設定要與 Amazon Q 互動的角色

  8. 選擇啟動筆記本