Search code examples
amazon-web-servicesamazon-ec2amazon-cloudfront

Attaching existing EC2 instance to new CloudFront in amazon aws


I have a EC2 instance running in my account, now I need to add an SSL certificate to my web server running inside that EC2 instance.

Can I create a new cloudfront and attach my existing EC2 instance to it? Would that solve my purpose?


Solution

  • Yes, you make CloudFront point to an EC2 instance or any server really. Check out Requiring HTTPS for Communication Between Viewers and CloudFront for more information on how to do this.

    Another option for free SSL certificates is Let’s Encrypt. Super easy to setup and works with Apache and Nginx.