AWS CodeStar Connections and interface VPC endpoints (AWS PrivateLink) - Developer Tools console

AWS CodeStar Connections and interface VPC endpoints (AWS PrivateLink)

You can establish a private connection between your VPC and AWS CodeStar Connections by creating an interface VPC endpoint. Interface endpoints are powered by AWS PrivateLink, a technology that enables you to privately access AWS CodeStar Connections 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 AWS CodeStar Connections APIs, because traffic between your VPC and AWS CodeStar Connections 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.

Considerations for AWS CodeStar Connections VPC endpoints

Before you set up an interface VPC endpoint for AWS CodeStar Connections, ensure that you review Interface endpoints in the Amazon VPC User Guide.

AWS CodeStar Connections supports making calls to all of its API actions from your VPC.

VPC endpoints are supported in all AWS CodeStar Connections Regions.

VPC endpoint concepts

The following are the key concepts for VPC endpoints:

VPC endpoint

The entry point in your VPC that enables you to connect privately to a service. The following are the different types of VPC endpoints. You create the type of VPC endpoint required by the supported service.

AWS PrivateLink

A technology that provides private connectivity between VPCs and services.

VPC endpoints for AWS CodeStar Connections actions

You can manage VPC endpoints for the AWS CodeStar Connections service.

Creating interface VPC endpoints for AWS CodeStar Connections actions

You can create a VPC endpoint for the AWS CodeStar Connections 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.

To start using connections with your VPC, create an interface VPC endpoint for AWS CodeStar Connections. When you create a VPC endpoint for AWS CodeStar Connections, choose AWS Services, and in Service Name, choose:

  • com.amazonaws.region.codestar-connections.api: This option creates a VPC endpoint for AWS CodeStar Connections API operations. For example, choose this option if your users use the AWS CLI, the AWS CodeStar Connections API, or the AWS SDKs to interact with AWS CodeStar Connections for operations such as CreateConnection, ListConnections, and CreateHost.

For the Enable DNS name option, if you select private DNS for the endpoint, you can make API requests to AWS CodeStar Connections using its default DNS name for the Region, for example, codestar-connections.us-east-1.amazonaws.com.

Important

Private DNS is enabled by default for endpoints created for AWS services and AWS Marketplace Partner services.

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

Creating a VPC endpoint policy for AWS CodeStar Connections actions

You can attach an endpoint policy to your VPC endpoint that controls access to AWS CodeStar Connections. The policy specifies the following information:

  • The principal that can perform actions.

  • The actions that can be performed.

  • The resources on which actions can be performed.

For more information, see Controlling access to services with VPC endpoints in the Amazon VPC User Guide.

Note

The com.amazonaws.region.codestar-connections.webhooks endpoint does not support policies.

Example: VPC endpoint policy for AWS CodeStar Connections actions

The following is an example of an endpoint policy for AWS CodeStar Connections. When attached to an endpoint, this policy grants access to the listed AWS CodeStar Connections actions for all principals on all resources.

{ "Statement": [ { "Sid": "GetConnectionOnly", "Principal": "*", "Action": [ "codestar-connections:GetConnection" ], "Effect": "Allow", "Resource": "*" } ] }

VPC endpoints for AWS CodeStar Connections webhooks

AWS CodeStar Connections creates webhook endpoints for you when you create or delete a host with VPC configuration. The endpoint name is com.amazonaws.region.codestar-connections.webhooks.

With the VPC endpoint for GitHub webhooks, hosts can send event data via webhooks to your integrated AWS services over the Amazon network.

Important

When you set up your host for GitHub Enterprise Server, AWS CodeStar Connections creates a VPC endpoint for webhooks event data for you. If you created your host before November 24, 2020, and you want to use VPC PrivateLink webhook endpoints, you must first delete your host and then create a new host.

AWS CodeStar Connections manages the lifecycle of these endpoints. To delete the endpoint, you must delete the corresponding host resource.

How webhook endpoints for AWS CodeStar Connections hosts are used

The webhook endpoint is where webhooks from third-party repositories are sent for AWS CodeStar Connections processing. A webhook describes a customer action. When you perform a git push, the webhook endpoint receives a webhook from the provider detailing the push. For example, AWS CodeStar Connections can notify CodePipeline to start your pipeline.

For cloud providers, such as Bitbucket, or GitHub Enterprise Server hosts that do not use a VPC, the webhook VPC endpoint does not apply because the providers are sending webhooks to AWS CodeStar Connections where the Amazon network is not used.