Home > Software design >  Issue AWS certificate for a single subdomain to be used with CloudFront?
Issue AWS certificate for a single subdomain to be used with CloudFront?

Time:03-22

My client has a domain example.com hosted somewhere.

We need to create a subdomain cloudfront.example.com in my AWS cloud in order to make my Cloudfront Distribution accessible on that subdomain.

CF requires an SSL certificate to work with a custom domain.

I was only able to find a solution which leads to 4th level subdomains via creating an AWS Hosted Zone (3rd level domain) in my AWS account where I can then create another subdomain (4th level).

Is it possible to register a single record in my client's DNS table to point to my CF Distro?

CodePudding user response:

Yes, you can use the client's DNS. What you need to do:

  1. Use ACM to create an SSL certificate for cloudfront.example.com. You will see a necessary CNAME to confirm the SSL certificate
  2. Add CNAME to your client's DNS that will validate the certificate
  3. In CloudFront, define alternate domain name (CNAME) as cloudfront.example.com
  4. In the client's DNS add a CNAME for cloudfront.example.com to point to your CloudFront distribution domain name (it's going to be some-hash.cloudfront.net)
  • Related