Guest User

Untitled

a guest
Nov 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. if [ -z ${KMS_KEY_ID} ]; then
  4. echo "KMS_KEY_ID unset! Exiting";
  5. exit 1
  6. fi
  7.  
  8. _INPUT=$1
  9.  
  10. cat $_INPUT \
  11. | aws kms encrypt \
  12. --key-id=${KMS_KEY_ID} \
  13. --plaintext fileb://<(cat -) \
  14. --output text \
  15. --query CiphertextBlob \
  16. | base64 --decode > output.kms.yml
Add Comment
Please, Sign In to add comment