Skip to content

Instantly share code, notes, and snippets.

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