Skip to content

Instantly share code, notes, and snippets.

@inge4pres
Last active October 18, 2016 17:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/bin/bash
# lego-aws-certificate-automation
# param: CREATE | UPDATE
# CREATE
mkdir -p $HOME/lego
lego --email="your@mail.com" --domains="4pr.es inge.4pr.es" --dns="route53" --path $HOME/lego run
aws iam upload-server-certificate --server-certificate-name cf-inge4pres \
--certificate-body file://$HOME/lego/certificates/4pr.es.crt \
--private-key file://$HOME/lego/certificates/4pr.es.key \
--path /cloudfront/inge4pres/
# UPDATE
lego --email="your@mail.com" --domains="4pr.es inge.4pr.es" --dns="route53" --path $HOME/lego renew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment