Creating your customization - CodeWhisperer

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

Creating your customization

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

This section explains how to create a customization with CodeWhisperer.

To create your customization, follow this procedure:

  1. Complete your setup of CodeWhisperer Professional. This includes enabling IAM Identity Center and authorizing an administrator to CodeWhisperer, and activating the CodeWhisperer console.

  2. Open the CodeWhisperer console.

  3. From the navigation pane on the left, choose Customizations.

  4. The customizations page will appear.

  5. Choose Create customization.

  6. Enter a customization name and (optional) description.

    Note

    Use both names and descriptions that will be informative to your developers. Developers from your organization who are authorized to use CodeWhisperer Enterprise will be able to see them in VS Code or JetBrains through the AWS plugin.

Connecting to your data source

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

Before you create a customization, you must connect to the data source that contains your codebase. How you do this depends on where your data source is.

If your data source is in Github, GitLab, or Bitbucket, then you must connect to it with CodeConnections. Otherwise, use Amazon S3.

To learn more about CodeConnections, see What are connections? in the Developer Tools console User Guide

To connect to your data source through CodeConnections, follow this procedure:

  1. Under Connection to source provider, select CodeConnections.

  2. If you are using an existing connection, choose Select existing connection. Then, under Select a connection, select your connection from the dropdown.

    alt_text

    Otherwise, choose Create a new connection.

  3. In the pop-up window that opens, navigate to your data source and follow the instructions in the console.

  4. After you create your data source, return to the Create customization page.

  5. Under Select a connection, select your connection from the dropdown.

alt_text

To connect to your data source through Amazon S3, follow this procedure:

  1. Under Connection to source provider, select Amazon S3.

  2. Choose Browse Amazon S3.

  3. Navigate to the bucket or folder containing your codebase and make a note of the URI.

    For more information, see Creating, configuring, and working with Amazon S3 buckets and Access control best practices in the Amazon S3 User Guide.

  4. Paste the URL into the field labeled Enter Amazon S3 URI.

Before you create your customization, you have the option of adding tags to it.

To learn more about tags, see the Tagging your AWS resources User Guide.

After following the procedures above, choose Create customization.

Customizations and your data

CodeWhisperer customizations use your content to present suggestions to you in the style of your organization's developers.

However, AWS will not store or use your content in any context that does not directly serve your enterprise.

AWS will not use your content to provide code suggestions to other customers.

CodeWhisperer will not reference security scans for other customers (or for you).

Troubleshooting the creation of your customization

  • You may receive the error: Total size of the provided repositories exceeds the maximum allowed size of number for a customization.

    In that case, remove a repository from your data source and try again.

  • You may receive the error: Insufficient data to create a customization. Add more files from supported languages and retry.

    In order for code written in a particular language to be used to create a
 customization, there must be at least 10 files containing code in that
 language in your data source. The total size of all code files (containing
 one or more languages) in your data source must be at least 20 MB.

    Some files, even if they are in the relevant language, will not count
 toward the 20 MB. For example, duplicate files and files in an unsupported
 format will not be counted.

    If you receive this error, add more files containing the programming language that is the focus of your customization, and try again.