Route53
Prerequisites
- Register or transfer a domain with Route53
- Deploy an app with Architect and make note of the
stagingandproductionURLs
Step 1: setup SSL certificates with AWS Certificate Manager
In this step we will request a certificate from Amazon for our domain.
- Open up AWS Certificate Manager in the AWS Console in
us-east-1(region is required!) - Click
Request a certificateand thenRequest a public certificate - Ensure
example.comand*.example.comfor sub domains to work - Choose
DNS validationand clickNext - Add any tags and confirm the request
- Expand the domain and click
Create record in Route53button - Verify CNAME record created in Route53 console Hosted zone
Step 2: setup custom domain with AWS API Gateway
Generate a domain with the certificate from Step 1.
- Sign into AWS API Gateway in the AWS Console
- Navigate to
Custom domain namesand clickCreate - Enter the domain name (e.g.
staging.example.comfor thestagingapp orexample.comfor theproductionapp) - Select the certificate created in Step 1
- Click
Create domain name - Make note of the generated
API Gateway domain nameinEndpoint configuration - Click on the tab
API mappingsandConfigure API mappings - For
APIselect the API and forStageselect$defaultand clickSave
Step 3: configure the domain Alias in AWS Route53
- Sign into AWS Route53 in the AWS Console
- Navigate to the Hosted zone for the domain
- Click
Create record - Enter the
Record name - Record type is
Aand toggleAliascheckbox on - Select
Alias to API Gateway - Select the region
- Select the API (should be the same value as the domain generated in Step 2)
- Click
Create records
Conclusion
Now we’re done! You can check to see if your domains are online with this DNS Checker tool.