Install certbot
:
brew install certbot
Generate certificate:
sudo certbot certonly --manual --email [email protected] -d secure.example.com
Create validation URL:
http://secure.example.com/.well-known/acme-challenge/…
Certificate will be stored in:
/etc/letsencrypt/live/secure.example.com/*
sudo aws iam upload-server-certificate --server-certificate-name secure-example-com-160906 --certificate-body file:///etc/letsencrypt/archive/secure.example.com/cert1.pem --private-key file:///etc/letsencrypt/archive/secure.example.com/privkey1.pem --certificate-chain file:///etc/letsencrypt/archive/secure.example.com/chain1.pem --path /cloudfront/
Edit CloudFront distribution settings and change SSL certificate to secure-example-com-160906
.