Skip to content

Instantly share code, notes, and snippets.

@zen4ever
Created February 9, 2016 16:26
Show Gist options
  • Save zen4ever/7b389e4466407ee273ff to your computer and use it in GitHub Desktop.
Save zen4ever/7b389e4466407ee273ff to your computer and use it in GitHub Desktop.
upload ssl
#!/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