Amazon CodeWhisperer and interface VPC endpoints (AWS PrivateLink) - CodeWhisperer

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

Amazon CodeWhisperer and interface VPC endpoints (AWS PrivateLink)

You can establish a private connection between your VPC and Amazon CodeWhisperer by creating an interface VPC endpoint. Interface endpoints are powered by AWS PrivateLink, a technology that enables you to privately access CodeWhisperer APIs without an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC don't need public IP addresses to communicate with CodeWhisperer APIs. Traffic between your VPC and CodeWhisperer does not leave the Amazon network.

Each interface endpoint is represented by one or more Elastic Network Interfaces in your subnets.

For more information, see Interface VPC endpoints (AWS PrivateLink) in the Amazon VPC User Guide.

Note

CodeWhisperer does not support endpoint policies.

Considerations for CodeWhisperer VPC endpoints

Before you set up an interface VPC endpoint for CodeWhisperer, ensure that you review Interface endpoint properties and limitations in the Amazon VPC User Guide.

CodeWhisperer supports making calls to all of its API actions from your VPC, in the context of services that are configured to work with CodeWhisperer.

Prerequisites

Before you begin any of the procedures below, ensure that you have the following:

  • An AWS account with appropriate permissions to create and configure resources.

  • A VPC already created in your AWS account.

  • Familiarity with AWS services, especially Amazon VPC and CodeWhisperer.

Creating an interface VPC endpoint for CodeWhisperer

You can create a VPC endpoint for the CodeWhisperer service using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI). For more information, see Creating an interface endpoint in the Amazon VPC User Guide.

Create a VPC endpoint for CodeWhisperer using the following service name:

  • com.amazonaws.region.codewhisperer

If you enable private DNS for the endpoint, you can make API requests to CodeWhisperer using its default DNS name for the Region, for example, codewhisperer.us-east-1.amazonaws.com.

For more information, see Accessing a service through an interface endpoint in the Amazon VPC User Guide.

Using an on-premises computer to connect to a CodeWhisperer endpoint

This section describes the process of using an on-premises computer to connect to CodeWhisperer through a AWS PrivateLink endpoint in your AWS VPC.

Using an in-console IDE to connect to a CodeWhisperer endpoint

This section describes the process of using an in-console IDE to connect to a CodeWhisperer endpoint.

In this context, an in-console IDE is an IDE that you access inside the AWS console, and authenticate to with IAM. Examples include AWS Cloud9, SageMaker Studio, and AWS Glue Studio.

  1. Create an interface VPC endpoint for CodeWhisperer.

  2. Set up CodeWhisperer with the in-console IDE.

  3. Configure the IDE to use the CodeWhisperer endpoint.

Connecting to CodeWhisperer through AWS PrivateLink from a third-Party IDE on an Amazon EC2 instance

This section will walk you through the process of installing a third-party Integrated Development Environment (IDE) like Visual Studio Code or JetBrains on an Amazon EC2 instance, and configuring it to connect to CodeWhisperer using AWS PrivateLink.

  1. Create an interface VPC endpoint for CodeWhisperer.

  2. Launch an Amazon EC2 instance in your desired subnet within your VPC. You can choose an Amazon Machine Image (AMI) that is compatible with your third-party IDE. For example, you can select an Amazon Linux 2 AMI.

  3. Connect to the Amazon EC2 instance.

  4. Install and Configure the IDE (Visual Studio Code or JetBrains).

  5. Install the AWS Toolkit, using one of the following procedures:

  6. Configure the IDE to connect via AWS PrivateLink.