选择您的 Cookie 首选项

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

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

Prerequisites for CodeWhisperer customizations - 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

Prerequisites for CodeWhisperer customizations

The CodeWhisperer Customizations feature is in preview, and is subject to change.

CodeWhisperer customizations build upon the foundation of CodeWhisperer Professional, and uses its features.

To use CodeWhisperer customizations you must first follow the CodeWhisperer Professional setup process under Setting up Amazon CodeWhisperer for administrators. This includes adding any users to your CodeWhisperer Professional profile that you also wish to grant access to CodeWhisperer Customizations.

When you use CodeWhisperer Customizations, your CodeWhisperer administrator must be authorized to access your codebase, which you may store on Amazon S3 or through AWS CodeStar. However, during the standard setup process for CodeWhisperer Professional, your AWS Organizations administrator does not provide the CodeWhisperer administrator with access to those services.

Note

If you are using GitHub as your data source, you can restrict usage to certain repositories. See Create a connection to GitHub in the Developer Tools Console User Guide.

Therefore, before you use CodeWhisperer Customizations, you must add the following permissions to your CodeWhisperer administrator's role:

{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "sso-directory:DescribeUsers" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codewhisperer:CreateCustomization", "codewhisperer:DeleteCustomization", "codewhisperer:ListCustomizations", "codewhisperer:UpdateCustomization", "codewhisperer:GetCustomization", "codewhisperer:ListCustomizationPermissions", "codewhisperer:AssociateCustomizationPermission", "codewhisperer:DisassociateCustomizationPermission" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codestar-connections:ListConnections", "codestar-connections:ListOwners", "codestar-connections:ListRepositories", "codestar-connections:GetConnection" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": "codestar-connections:UseConnection", "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "codestar-connections:ProviderAction": [ "GitPull", "ListRepositories", "ListOwners" ] } } }, { "Effect": "Allow", "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:ListBucket*" ], "Resource": [ "*" ] } ] }

Accessing customization-related messages in Amazon CloudWatch Logs

CodeWhisperer stores information about the creation of your customization in Amazon CloudWatch Logs.

You can authorize your CodeWhisperer administrator to view those logs with the following permission set.

To learn more about the permissions required to delivery logs to multiple resources, see Logging that requires additional permissions [V2] in the Amazon CloudWatch Logs User Guide.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLogDeliveryActions", "Effect": "Allow", "Action": [ "logs:PutDeliverySource", "logs:GetDeliverySource", "logs:DeleteDeliverySource", "logs:DescribeDeliverySources", "logs:PutDeliveryDestination", "logs:GetDeliveryDestination", "logs:DeleteDeliveryDestination", "logs:DescribeDeliveryDestinations", "logs:CreateDelivery", "logs:GetDelivery", "logs:DeleteDelivery", "logs:DescribeDeliveries", "firehose:ListDeliveryStreams", "firehose:DescribeDeliveryStream", "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": [ "arn:aws:logs:us-east-1:account number:log-group:*", "arn:aws:firehose:us-east-1:account number:deliverystream/*", "arn:aws:s3:::*" ] } ] }

For more information about setting the permissions needed to administer CodeWhisperer Professional, see Assigning CodeWhisperer administration rights.

Note

The encryption key that you set up for CodeWhisperer Professional is also used for CodeWhisperer Customizations.

It's important to create your customization using the best possible source material. When preparing your data source, add code containing patterns that are encouraged on your team. Avoid code containing anti-patterns, bugs, security vulnerabilities, performance issues, and so forth.

Your data source must contain at least 20 MB, and at most 7 GB, of source code files
 from supported languages. There is no limit on the number of files, but you must include at least 10 files for each language that you want your customization to support. In the Amazon S3 data
 source, ensure that all source code is placed within a directory and not at the root
 level. Any files at the root level will be ignored.

Note

CodeWhisperer Customizations supports the following languages and file extensions:

  • Java (.java)

  • JavaScript (.js, .jsx)

  • Python (.py)

  • TypeScript (.ts, .tsx)

下一主题:

Creating

上一主题:

Customizations
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。