A developer is implementing client-side decryption for a serverless application. The application retrieves encrypted log archives (each averaging in size) from an Amazon S3 bucket. The logs were encrypted using envelope encryption with an AWS KMS customer managed key. The encrypted data key is stored as metadata alongside each S3 object.
Which two actions must the developer perform to decrypt the log archives? (Select TWO.)
- Call the KMS Decrypt API operation, passing the encrypted data key to retrieve the plaintext data key.Answer
- Decrypt the log archive locally using the retrieved plaintext data key and a symmetric decryption algorithm.Answer
- CSend the encrypted log archive directly to the KMS Decrypt API to be decrypted by AWS KMS.
- DCall the KMS GetKeyPolicy API to retrieve the private key of the customer managed key to perform local decryption.
- ERetrieve the plaintext decryption key from the AWS Systems Manager Parameter Store using the GetParameter API.
Answer
To decrypt the log archives, the developer must call the KMS Decrypt API operation, passing the encrypted data key to retrieve the plaintext data key, and then decrypt the log archive locally using the retrieved plaintext data key and a symmetric decryption algorithm.
The correct options identify the proper steps for client-side envelope decryption: first, the client must call the KMS Decrypt API to decrypt the encrypted data key (which is small enough to fit within the KMS limit); second, the client must perform the decryption of the actual log file locally using the resulting plaintext data key and a symmetric decryption algorithm. This avoids transmitting large data payloads over the network to KMS.
Step-by-Step Solution
Key Concept
Envelope encryption is a method where data is encrypted with a unique data key, and the data key itself is encrypted under a root key (an AWS KMS customer managed key). To decrypt the data, the encrypted data key must first be sent to KMS to be decrypted. The resulting plaintext data key is then used locally by the application to decrypt the large payload, avoiding the transmission of large files over the network to KMS.
Estimated Time:1m 30s