Created
February 9, 2016 16:26
-
-
Save zen4ever/7b389e4466407ee273ff to your computer and use it in GitHub Desktop.
upload ssl
This file contains 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 characters
#!/usr/local/bin/bash | |
export DOMAIN_NAME=$1 | |
export PROFILE_NAME=$2 | |
if [ -z "$3" ]; then | |
export CERTIFICATE_NAME=$(echo $DOMAIN_NAME | sed -e 's/\*/wildcard/g') | |
else | |
export CERTIFICATE_NAME=$3 | |
fi | |
echo $CERTIFICATE_NAME | |
aws iam upload-server-certificate --server-certificate-name $CERTIFICATE_NAME$(date +"-%Y-%m-%d") --certificate-body file://$DOMAIN_NAME.crt --private-key file://$DOMAIN_NAME.key --certificate-chain file://$DOMAIN_NAME.chain.crt --profile $PROFILE_NAME # --path /cloudfront/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment