To achieve this, please follow the instructions.
ANS1: Yes, you need to create Additional SSL in US East (N. Virginia) Region
ANS2: Yes, you need to create Additional DNS records in Route53
Soultion1:
- Follow the link and create SSL certificate in US East (N. Virginia) Region because if you wnated to use SSL with cloudfront , you have to create SSL in US East (N. Virginia) Region because that is limitation by AWS to create SSL in that specific region. This link explain the solution.
Soultion2:
Follow the link
yourDomain.com. A ALIAS your-aws-alb-alias
subdomain.yourDomain.com. A ALIAS your-aws-alb-alias
How to Creating CloudFront distribution with ALB as an origin?
Go to CloudFront Console.
Click “Create distribution”.
Choose our new Application Load Balancer as an origin and Protocol: HTTPS only.
Select Viewer protocol policy: “Redirect HTTP to HTTPS”.
(Optional) You can select Caching disabled for Dynamic content and then create a caching policy for specific folders that you want to cache in CloudFront Edge locations. Then select Origin request policy: AllViewer.
Add a domain name to Alternate domain name (CNAME). Also add subdomain name here as well against “Add item” against which you want to record in Route 53. Note: Wildcard “*” doesn’t work.
Choose the SSL certificate from ACM. The certificate has to be in the N. Virginia region (us-east-1). Also certificate should be valid for sub domain as well.
- Click “Create distribution” and wait a couple of minutes for our CloudFront distribution to be deployed.
How to Create Route 53 domain records for CloudFront distribution?
- Open Route 53 console and go to the hosted zone.
- Click “Create records”.
- The routing policy should be simple routing. Select Route traffic to: Alias to CloudFront distribution and URL of the CloudFront distribution.
4. It can take some time to propagate these DNS settings.