Route53
Prerequisites
- Register or transfer a domain with Route53
- Deploy an app with Architect and make note of the
staging
andproduction
URLs
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 certificate
and thenRequest a public certificate
- Ensure
example.com
and*.example.com
for sub domains to work - Choose
DNS validation
and clickNext
- Add any tags and confirm the request
- Expand the domain and click
Create record in Route53
button - 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 names
and clickCreate
- Enter the domain name (e.g.
staging.example.com
for thestaging
app orexample.com
for theproduction
app) - Select the certificate created in Step 1
- Click
Create domain name
- Make note of the generated
API Gateway domain name
inEndpoint configuration
- Click on the tab
API mappings
andConfigure API mappings
- For
API
select the API and forStage
select$default
and 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
A
and toggleAlias
checkbox 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.