Skip to content

Instantly share code, notes, and snippets.

@emalloy
Created November 17, 2017 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emalloy/277f4d7cfd54e5a77c15d1326ab666ad to your computer and use it in GitHub Desktop.
Save emalloy/277f4d7cfd54e5a77c15d1326ab666ad to your computer and use it in GitHub Desktop.
kms_decrypt.sh
#!/usr/bin/env bash
_INPUT=$1
cat $_INPUT \
| aws kms decrypt \
--ciphertext-blob fileb://<(cat -) \
--output text \
--query Plaintext \
| base64 --decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment