Using CodeWhisperer with AWS Glue Studio - CodeWhisperer

CodeWhisperer's features are becoming a part of Amazon Q Developer. Learn more

Using CodeWhisperer with AWS Glue Studio

This page describes how to set up and activate Amazon CodeWhisperer for AWS Glue Studio Notebook. Once activated, CodeWhisperer can make code recommendations automatically as you write your ETL code.


CodeWhisperer supports both Python and Scala, the two languages used for coding ETL scripts for Spark jobs in AWS Glue Studio.

In the following procedure, you will set up AWS Glue to work with CodeWhisperer.

  1. Set up AWS Glue Studio Notebook.

  2. Attach the following policy to your IAM role for Glue Studio notebook

    { "Version": "2012-10-17", "Statement": [ { "Sid": "CodeWhispererPermissions", "Effect": "Allow", "Action": [ "codewhisperer:GenerateRecommendations" ], "Resource": "*" } ] }
  3. Open the Glue console

  4. Under ETL jobs, choose Notebooks.

  5. Verify that Jupyter Notebook is selected. Choose Create.

  6. Enter a Job name.

  7. For IAM role, select the role that you configured to interact with CodeWhisperer

  8. Choose Start notebook.