Search code examples
amazon-web-servicesamazon-cloudfrontaws-certificate-manager

Trouble getting my simple website to use SSL within SSL and CloudFront


I'm trying to install an SSL for my website hosted on an EC2, hosted in Ireland. This article below states the load balancer needs to be hosted in n. virginia for Cloud Front to work (so that I can use my custom SSL certificate). Will this work if my website is in Ireland?

I've tried several times but yet to get it working. I have the following - EC2, route53, load balancer, certificate manager, cloudfront.

AWS: Custom SSL certificate option is disabled in CloudFront, but I created a SSL certificate using AWS Certificate Manager

Many thanks,

Updates

Screenshot of my certificate

certificate

CloudFront

CloudFront

route 53

cloudfront


Solution

  • You don't need to have your load balancer hosted in North Virginia, this is referring to using AWS Certificate Manager and CloudFront together. I.e., if you want to request an SSL certificate using the AWS Certificate Manager and attach it to your CloudFront distribution.

    This is because CloudFront distributes its SSL certificates from North Virginia out to the other edge locations in its distribution network.

    What you can do is:

    • ACM certificate created in North Virginia
    • CloudFront distribution created and certificate applied to it
    • Route 53 hosted zone with an Alias to CloudFront distribution
    • Load balancer in Ireland set as an origin in CloudFront distribution
    • EC2 instance in Ireland

    Example of Alias in Route 53 pointing to CloudFront distribution:

    enter image description here

    Example of CloudFront DNS:

    enter image description here