Skip to content

Instantly share code, notes, and snippets.

@bitnot
Created April 8, 2019 15:11
Show Gist options
  • Save bitnot/ab9be66a24fa42af383f483eb457c29b to your computer and use it in GitHub Desktop.
Save bitnot/ab9be66a24fa42af383f483eb457c29b to your computer and use it in GitHub Desktop.
Decrypt Base64-encoded KMS secret. Output base-64 encoded plaintext value.
alias kmsdecode='f(){aws kms decrypt --ciphertext-blob fileb://<(echo $1 | base64 --decode) --output text --query Plaintext }; f'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment