选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS managed policies for Amazon CodeWhisperer - CodeWhisperer
此页面尚未翻译为您的语言。 请求翻译

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

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

Updated AWSServiceRoleForCodeWhispererPolicy

Added DescribeApplication permission, which allows you to retrieve information about CodeWhisperer.

March 29, 2024

Updated AWSServiceRoleForCodeWhispererPolicy

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

Updated AWSServiceRoleForCodeWhispererPolicy

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
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。