Skip to content

Instantly share code, notes, and snippets.

@balintbrews
Last active October 4, 2017 16:14
Show Gist options
  • Save balintbrews/923cd37ea54cdf74e8c14c71aec85c69 to your computer and use it in GitHub Desktop.
Save balintbrews/923cd37ea54cdf74e8c14c71aec85c69 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -le 3 ]
then
echo "Usage: $0 cert-name path-to-cert-public-key path-to-cert-private-key path-to-cert-chain"
exit 1
fi
aws iam upload-server-certificate \
--server-certificate-name ${1} \
--certificate-body "`cat ${2}`" \
--private-key "`cat ${3}`" \
--certificate-chain "`cat ${4}`" \
--path /cloudfront/
aws iam get-server-certificate --server-certificate-name ${1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment