CodeWhisperer's features are becoming a part of Amazon Q Developer. Learn more
AWS managed policies for Amazon CodeWhisperer
An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles.
Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining customer managed policies that are specific to your use cases.
You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services.
For more information, see AWS managed policies in the IAM User Guide.
AWS managed policy: AWSServiceRoleForCodeWhispererPolicy
This AWS managed policy grants permissions commonly needed to use Amazon CodeWhisperer. The policy is added to the AWSServiceRoleForCodeWhisperer that is created when you onboard to CodeWhisperer.
You can't attach AWSServiceRoleForCodeWhispererPolicy to your IAM entities. This policy is attached to a service-linked role that allows CodeWhisperer to perform actions on your behalf. For more information, see Using service-linked roles for CodeWhisperer.
This policy grants administrator
permissions that allow code
artifacts to be scanned for security purposes, and that allow usage metrics to be collected
in order to track billing.
Permissions details
This policy includes the following permissions.
-
cloudwatch
– Allows principals to publish usage metrics to CloudWatch for Billing / Usage. This is required so that you can track your usage of CodeWhisperer in CloudWatch. -
codeguru-security
– Allows principals to upload code artifacts, perform codescans and list codescan findings with Amazon CodeGuru. This is required so that CodeWhisperer can conduct a security scan on your code from within the JetBrains and Visual Studio Code IDEs. -
sso
– Allows principals to retrieve all details of the CodeWhisperer application as represented in IAM Identity Center. This is required to enable billing of CodeWhisperer usage.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sso-directory:ListMembersInGroup" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "sso:ListProfileAssociations", "sso:ListProfiles", "sso:ListDirectoryAssociations", "sso:DescribeRegisteredRegions", "sso:GetProfile", "sso:GetManagedApplicationInstance", "sso:DescribeApplication" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codeguru-security:CreateUploadUrl" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codeguru-security:CreateScan", "codeguru-security:GetScan", "codeguru-security:ListFindings", "codeguru-security:GetFindings" ], "Resource": [ "arn:aws:codeguru-security:*:*:scans/CodeWhisperer-*" ] }, { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ], "Resource": "*", "Condition": { "StringEquals": { "cloudwatch:namespace": [ "AWS/CodeWhisperer" ] } } } ] }
To view this policy in the context of other AWS managed policies, see AWSServiceRoleForCodeWhispererPolicy.
CodeWhisperer updates to AWS managed policies
View details about updates to AWS managed policies for CodeWhisperer since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the CodeWhisperer Document history page.
Change | Description | Date |
---|---|---|
Added DescribeApplication permission, which allows you to retrieve information about CodeWhisperer. |
March 29, 2024 | |
Added GetFindings and GetManagedApplicationInstance permissions. GetFindings permissions simplify cross-service interactions, but do not impact your experience with the service. GetManagedApplicationInstance prevents you from being billed for disabled CodeWhisperer application instances. |
June 19, 2023 | |
Added permissions for getting user and group information for billing purposes. |
May 31, 2023 | |
AWSServiceRoleForCodeWhispererPolicy – New policy |
Added a new policy to allow CodeWhisperer to call CloudWatch and CodeGuru on your behalf. This policy is added to the AWSServiceRoleForCodeWhisperer that is created when you onboard to Amazon CodeWhisperer. |
March 29, 2023 |
CodeWhisperer started tracking changes |
CodeWhisperer started tracking changes for its AWS managed policies. |
March 29, 2023 |