Assign Domain on Route53 to CloudFront
In this post, I am going to assign a domain name (on Route53) to the website hosted on S3 thru CloudFront (prev post).
user <-> Route53
-> CloudFront -> S3
Issue & Validate Certificate
Console > Certificate Manager (ACM) > Request a certificate
- Add domain names > Domain name: *.YOUR_DOMAIN > Next
- Select validation method > DNS validation > Next
- Add tags > Review
- Review > Confirm and request
- Validation > Create record in Route 53 > Continue
The validation will take a few minutes.
Add CNAME to CloudFront
Console > CloudFront > [cloud-front-id] > Edit
- Alternate Domain Names: www.YOUR_DOMAIN
- SSL Certificate: Custom SSL Certificate: (select your certificate)
> Yes, Edit
Add A Record
Console > Route53 > Hosted zone > YOUR_DOMAIN > Create record:
- Record name: www
- Recird type: A & AAAAA
- (Turn on Alias)
- Route traffic to: Alias to CloudFront distribution, Select distribution
> Create records
Access
% curl www.YOUR_DOMAIN
foo
Comments
Post a Comment