Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
LetsEncrypt, AWS Certificate Manager, and CloudFront

Using LetsEncrypt SSL certificates with AWS Certificate Manager and CloudFront

This is a document for managing LetsEncrypt certificates on AWS using AWS Certificate Manager and configuring on CloudFront using the AWS CLI.


Follow the instructions to set up the certbot and aws commands on your local machine:


Obtaining the Certificate via certbot

certbot certonly --manual

Follow the instructions. If all goes well, your certificate will be in /etc/letsencrypt/live/<fqdn>, where <fqdn> is the fully-qualified domain name (eg.,, etc.)

Amazon Web Services


Import the certificate into IAM:

aws iam upload-server-certificate --server-certificate-name alphaPWServerCertificate --certificate-body file://etc/letsencrypt/live/<fqdn>/cert.pem --private-key file://etc/letsencrypt/live/<fqdn>/privkey.pem --certificate-chain file://etc/letsencrypt/live/<fqdn>/chain.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment