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

  1. Add domain names > Domain name: *.YOUR_DOMAIN > Next
  2. Select validation method > DNS validation > Next
  3. Add tags > Review
  4. Review > Confirm and request
  5. 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


Ref: https://docs.aws.amazon.com/en_us/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html


Access

% curl www.YOUR_DOMAIN

foo


Comments

Popular posts from this blog

Minikube Installation for M1 Mac

Selenide: Quick Start

PyCharm: Quick Start