Using Amazon Q Developer with AWS Cloud9 - Amazon Q Developer

Using Amazon Q Developer with AWS Cloud9

AWS Identity and Access Management permissions for AWS Cloud9

For Amazon Q to provide recommendations in AWS Cloud9 console, you must enable the correct IAM permissions for either your IAM user or role. You must add the codewhisperer:GenerateRecommendations permission, as outlined in the sample IAM policy below:

Note

The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AmazonQDeveloperPermissions", "Effect": "Allow", "Action": ["codewhisperer:GenerateRecommendations"], "Resource": "*" } ] }

It is best practice to use IAM policies to grant restrictive permissions to IAM principals. For details about working with IAM for AWS Cloud9, see Identity and access management in AWS Cloud9 in the AWS Cloud9 user guide.

Activating Amazon Q with AWS Cloud9

To activate Amazon Q in the AWS Cloud9 console code editor, complete these steps.

  1. From inside your existing AWS Cloud9 environment, choose the AWS logo on the left edge of the window. A panel will expand rightward.

  2. In the lower part of the panel, under Developer tools, open the Amazon Q dropdown.

  3. Choose Resume Auto-Suggestions.

For examples of how Amazon Q integrates with AWS Cloud9 and displays code suggestions in the AWS Cloud9 IDE, see Code examples.