- Newest
- Most votes
- Most comments
To enable Amazon Q data integration in AWS Glue Studio notebooks, you need to ensure your IAM permissions are correctly configured. Based on your current setup, there are a few adjustments needed:
- Your IAM permissions should be more specific. Instead of using wildcard permissions like "codewhisperer:" and "q:", you should use the exact permissions required:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "glue:StartCompletion", "glue:GetCompletion" ], "Resource": [ "arn:aws:glue:*:*:completion/*" ] }, { "Sid": "AmazonQDeveloperPermissions", "Effect": "Allow", "Action": [ "codewhisperer:GenerateRecommendations" ], "Resource": "*" } ] }
-
Make sure this policy is attached to the notebook IAM role that you're using for your interactive session.
-
For AWS Glue interactive sessions, you might need to use a specific role like
AWSGlueSessionUserRestrictedNotebookServiceRolewhich provides sufficient access to interact with AWS Glue Studio notebook sessions. -
If you're using a custom role, ensure it has the necessary permissions for both the AWS Glue Studio notebook and the interactive session resources.
-
Verify that your AWS region supports CodeWhisperer integration with AWS Glue Studio. According to the information available, CodeWhisperer support in AWS Glue Studio is available in all AWS regions where Glue is accessible.
After making these adjustments, restart your Glue session to apply the changes. There are no additional account-level features that need to be enabled specifically for CodeWhisperer in Glue notebooks, as this integration is available by default in supported regions.
Sources
Configuring IAM permissions - AWS Glue
Community | 2023 CodeWhisperer Year in Review
Interactive sessions with IAM - AWS Glue
Granting AWS managed policies for AWS Glue - AWS Glue
answered 10 months ago
Hello.
Have you attached an IAM policy with "iam:PassRole" set?
https://docs.aws.amazon.com/glue/latest/dg/glue-is-security.html
Relevant content
- AWS OFFICIALUpdated 2 years ago
