Created
November 23, 2012 14:46
-
-
Save maxmanders/4135953 to your computer and use it in GitHub Desktop.
Generate AWS IAM Certificate
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
#!/bin/bash | |
outdir=$1 | |
if [ -z "${outdir}" ]; then | |
outdir=/tmp/ | |
fi | |
cd ${outdir} | |
openssl genrsa -out pk-amazon.pem 2048 | |
openssl req -new -x509 -key pk-amazon.pem -out cert-amazon.pem -days 3650 | |
openssl pkcs8 -topk8 -in pk-amazon.pem -nocrypt > pk-temp.pem | |
mv pk-temp.pem pk-amazon.pem | |
cat cert-amazon.pem | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment