View a markdown version of this page

Create an interface endpoint - AWS Context

Create an interface endpoint

To create an interface endpoint for AWS Context, use the service name com.amazonaws.region.context, where region is the AWS Region code, for example us-east-1. For instructions on creating an interface endpoint, see Create an interface endpoint in the AWS PrivateLink Guide.

When you create the endpoint, set the following options:

  • To use the default AWS Context DNS names, keep Enable DNS name selected. You need this option to use the AWS Context MCP server.

  • Choose a security group that allows inbound HTTPS (TCP port 443) from the resources that call AWS Context.

The following AWS CLI example creates a dual-stack endpoint in US East (N. Virginia) with private DNS enabled. In this example, replace the VPC, subnet, and security group IDs with your own:

aws ec2 create-vpc-endpoint \ --vpc-id vpc-1a2b3c4d \ --vpc-endpoint-type Interface \ --service-name com.amazonaws.us-east-1.context \ --subnet-ids subnet-1a2b3c4d subnet-5e6f7a8b \ --security-group-ids sg-1a2b3c4d \ --ip-address-type dualstack \ --private-dns-enabled

The example uses the following values:

  • vpc-1a2b3c4d – The ID of your VPC.

  • subnet-1a2b3c4d and subnet-5e6f7a8b – The IDs of dual-stack subnets in different Availability Zones.

  • sg-1a2b3c4d – The ID of your security group.

Connect to AWS Context through the endpoint

With private DNS enabled (the default), the endpoint serves both the API DNS name context.region.api.aws and the MCP DNS name context-mcp.region.api.aws, so requests from your VPC to either name go through the endpoint. The AWS CLI and SDKs use these names by default, so you don’t need to change your code.

If you disable private DNS, specify the endpoint’s DNS name in your API calls, for example aws context list-agent-contexts --endpoint-url https://vpc-endpoint-id.context.region.vpce.amazonaws.com. Replace vpc-endpoint-id with the ID of your endpoint. To use the AWS Context MCP server, you must enable private DNS.