How to use Let’s Encrypt with both EC2 and Cloudfront

amazon ec2amazon-cloudfrontamazon-web-servicesaws-clilets-encrypt

I want to use Let's Encrypt certificates for both EC2 and Cloudfront.

  • I am creating a wordpress installation EC2 t2.micro using Ubuntu
    16.04(HVM) AMI and nginx. EC2 region will be us-east-2 (Ohio).
  • I can create Let's Encrypt cert using the certbot for the EC2 and can
    upload the cert to AWS IAM through CLI to use for Cloudfront.

The issue I am facing is:
The certificate generated by certbot for the EC2 will be for example.com but I want to use cdn.example.com for Cloudfront. Is it possible to create and use two different certs, one for the EC2 and the other for Cloudfront?

Best Answer

Use the AWS Certificate Manager to create the cert for CloudFront. Use Let's Encrypt for the instance security certificate.

I've done this, it works fine.

Related Topic