Private Custom Domain for Amazon API Gateway Private REST API

VPC endpoint → Amazon API Gateway REST API

Create Amazon API Gateway private REST API with private custom domain name configured with private SSL certificate.

1. Private Certificate Authority and API Gateway Setup:
1.1 Create an PCA
1.2 Issue a root certificate through the PCA
1.3 Create a certificate in ACM using PCA's root certificate
1.4 Create a private REST API in API gateway
1.5 Create API Gateway's private custom domain configured with ACM certificate created in step 3
1.6 Configure a Lambda function as the API Gateway backend processor
1.7 Deploy the private REST API through API Gateway
1.8 Associate the custom domain with the API Gateway stage
2. VPC Endpoints configurations for private communication:
2.1 'acm-pca' VPC Endpoint - Facilitates communication with PCA
2.2 'execute-api' VPC Endpoint - Provides private access to the REST API
3. DNS Configuration:
3.1 Establish a private hosted zone for the domain name
3.2 Create a CNAME record within the hosted zone for custom domain name
3.3 Point API Gateway's private custom domain name to the 'execute-api' VPC Endpoint DNS name

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-private-cdn-private-ca-sam

Deploy

See the GitHub repo for detailed deployment instructions.


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete --stack-name apigw-private-cdn-private-ca-sam.

Created by:

Vijay Shekhar Rao

Vijay Shekhar Rao

Vijay Shekhar Rao is a Partner Solutions Architect working with global system integrators. Before joining AWS, Vijay spent several years architecting, building, managing, and troubleshooting complex infrastructure for critical systems. When not working, he enjoys time with his family and tries to stay healthy.

Follow on LinkedIn

Tushar Thapar

Tushar Thapar

Tushar Thapar is a Cloud Engineer at Amazon Web Services based in Australia.

Follow on LinkedIn