Skip to content

Instantly share code, notes, and snippets.

@mijdavis2
Created July 19, 2019 05:09
Show Gist options
  • Save mijdavis2/5f8350b1df5d8d0d33d55a48f242ecfe to your computer and use it in GitHub Desktop.
Save mijdavis2/5f8350b1df5d8d0d33d55a48f242ecfe to your computer and use it in GitHub Desktop.
Upload SSL cert to AWS IAM (useful for LB incompatible certs like 4096)
#!/usr/bin/fish
# Name allows for "."
# so might as well use full domain minus the "*"
# if you are using a wildcard cert...
#
# But you should at least use one subdomain if you wildcard
# ...for security... just sayin.
# Using absolute path is more reliable.
# Mind your pre&post "(pwd)" slashes.
aws iam upload-server-certificate \
--server-certificate-name .subdomain.mydomain.com \
--certificate-body file://(pwd)/mydomain_com_12345677890_pem.pem \
--cerfiticate-chain file://(pwd)/mydomain_com_12345677890_certchain_pem.pem \
--private-key file://(pwd)/mydomain_com_12345677890_pem.key
# Not using fish yet?
# Wish you weren't so awkward, bud.
# Figure it out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment