December 2017
Intermediate to advanced
410 pages
11h 5m
English
In order to decrypt the ciphertext stored in encrypted.txt, we can run this command:
aws kms decrypt --ciphertext-blob fileb://encrypted.txt --query Plaintext --output text | base64 -d

In the previous command, we have decoded the plaintext value that we received from KMS with the help of base64 so that we can get the ideal text back.
One of the disadvantages of this approach is that AWS KMS allows encryption of only 4 KB of data with the help of CMK. In many cases, the data might be much larger and using this solution might not always work.
In such cases, we make use of envelope encryption.
Read now
Unlock full access