Amazon API Gateway Edge Custom Domain

API Gateway REST API

Create Edge Custom Domain in API Gateway.

The SAM template deploys an Amazon API Gateway Edge Custom Domain Name.
The Edge Custom Domain Name is mapped to a Stage in an existing API Gateway. Additionally, a Route53 A record is created to map the Edge 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) in the us-east-1 Region 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


Clone repo

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

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