Amazon API Gateway regional custom domain

API Gateway

Create a regional custom domain in API Gateway

The SAM template deploys an Amazon API Gateway Regional Custom Domain Name.
The Regional Custom Domain Name is mapped to a Stage in an existing API Gateway. Additionally, a Route53 A record is created to map the Regional Custom Domain Name (i.e. example.com) to the Target Domain Name created by API Gateway (i.e. d-abcde12345.execute-api.ap-southeast-2.amazonaws.com).
As prerequisites for this pattern, you must have:
* A valid certificate in ACM (Amazon Certificate Manager) that covers the namespace of the domain you would like to use (i.e. *.mydomain.com).
* A public Hosted Zone in Route 53 with the domain name you would like to use (i.e. mydomain.com).
* An API Gateway API (REST, HTTP or Websockets) and a deployed Stage within this API.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-custom-domain-regional

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Albert Blaya

Albert Blaya

Albert is a Solutions Architect at Amazon Web Services based in Australia.

Follow on LinkedIn