Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Forked from radiofrequency/aws_import.sh
Created June 29, 2020 23:14
Show Gist options
  • Save tuxfight3r/084bba1d23d444d4521a4d1aa587826f to your computer and use it in GitHub Desktop.
Save tuxfight3r/084bba1d23d444d4521a4d1aa587826f to your computer and use it in GitHub Desktop.
Import lets encrypt cert to aws certificate manager in renew hook
#place in /etc/letsencrypt/renewal-hooks/post
export AWS_ACCESS_KEY_ID=XXX
export AWS_SECRET_ACCESS_KEY=XXX
#certs must be in us-east-1 to use with cloudfront
export AWS_DEFAULT_REGION=us-east-1
#run without --certificate-arn first time then specify arn for updates
aws acm import-certificate --certificate file:///etc/letsencrypt/live/site.com/cert.pem --private-key file:///etc/letsencrypt/live/site.com/privkey.pem --certificate-chain file:///etc/letsencrypt/live/site.com/chain.pem --certificate-arn specifyarnforupdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment