Skip to content

Instantly share code, notes, and snippets.

@neilkuan
Created February 17, 2021 07:54
Show Gist options
  • Select an option

  • Save neilkuan/b7cd43a4d7e271d24dd6f979d3bb140b to your computer and use it in GitHub Desktop.

Select an option

Save neilkuan/b7cd43a4d7e271d24dd6f979d3bb140b to your computer and use it in GitHub Desktop.
#!/bin/bash
#$1 put kms id.
#$2 put values.
aws kms encrypt --key-id "$1" --plaintext $2 --output text --query CiphertextBlob
#output echo "output" | base64 -d file.txt
#decrypt via kms .
# aws kms decrypt --ciphertext-blob fileb://file.txt --query Plaintext --output text | base64 -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment