-
-
Save zxkane/e90de06b339f3c9d02ca63edfadbb4c9 to your computer and use it in GitHub Desktop.
Revisions
-
zxkane created this gist
Dec 13, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # install tools pip3 install certbot acme certbot-dns-route53 # export DOMAIN_NAME=clickstream.example.com export CERT_NAME=$DOMAIN_NAME-$(/bin/date +%s) # request fress SSL cert via DNS chanllege certbot certonly --dns-route53 -d $DOMAIN_NAME --email [email protected] --agree-tos --non-interactive --work-dir ./ --logs-dir ./ --config-dir ./ -v # upload cert to IAM aws iam upload-server-certificate --server-certificate-name $CERT_NAME --certificate-body file:/live/$DOMAIN_NAME/cert.pem --private-key file:/live/$DOMAIN_NAME/privkey.pem --certificate-chain file:/live/$DOMAIN_NAME/chain.pem --path /cloudfront/clickstream/ | jq '.ServerCertificateMetadata.ServerCertificateId' --raw-output