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:
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. www.example.com, example.com, etc.)
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