Skip to content

Instantly share code, notes, and snippets.

@dhavaln
Created July 3, 2019 18:09
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 dhavaln/bdf5a8142aa7808eb4c0832aad083ec4 to your computer and use it in GitHub Desktop.
Save dhavaln/bdf5a8142aa7808eb4c0832aad083ec4 to your computer and use it in GitHub Desktop.
AWS KMS encrypt/decrypt
aws kms encrypt --key-id <key id> --plaintext "Hello world" --profile <user profile> --output text --query CiphertextBlob | base64 --decode > encryptedtext
aws kms decrypt --ciphertext-blob fileb://encryptedtext --output text --query Plaintext --profile <user profile> | base64 --decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment