A developer is building a healthcare application that processes patient medical images. Each image file is approximately in size. The developer needs to encrypt these images locally using client-side envelope encryption with an AWS KMS customer managed key before uploading them to an Amazon S3 bucket.
Which of the following steps must the developer perform to complete this encryption process? (Select TWO.)
- Call the AWS KMS GenerateDataKey API operation to retrieve a plaintext data key and an encrypted data key.Answer
- Encrypt the medical image file locally using the plaintext data key, and then delete the plaintext data key from memory.Answer
- CCall the AWS KMS Encrypt API operation to encrypt the entire image file directly in the cloud.
- DUpload the plaintext data key to AWS Secrets Manager to make it available for future decryption operations.
- EExport the private key material of the KMS customer managed key to perform the encryption on the local server.
Answer
To perform client-side envelope encryption, the developer must call the AWS KMS GenerateDataKey operation to retrieve a plaintext data key and an encrypted data key, encrypt the file locally using the plaintext data key, and then delete the plaintext data key from memory.
The correct workflow for client-side envelope encryption requires generating a data key using the GenerateDataKey API operation. This provides a plaintext data key to perform the local symmetric encryption on the image and an encrypted data key. Once the file is encrypted, the plaintext data key must be removed from memory to ensure security.
Step-by-Step Solution
Key Concept
AWS KMS client-side envelope encryption workflow for payloads exceeding the KMS API size limits.