A developer is building a document processing application that must client-side encrypt files up to in size before uploading them to an Amazon S3 bucket. The application must use a customer managed key in AWS Key Management Service (AWS KMS) for this process. Which of the following actions must the developer perform to implement this client-side encryption workflow? (Select TWO.)
- Call the KMS GenerateDataKey API operation using the customer managed key to receive a plaintext data key and an encrypted data key.Answer
- Encrypt the file locally using the plaintext data key, then delete the plaintext data key from memory.Answer
- CCall the KMS Encrypt API operation to encrypt the file directly using the customer managed key.
- DCall the KMS GenerateDataKeyWithoutPlaintext API operation, and pass the resulting ciphertext key to AWS Secrets Manager to retrieve the plaintext key.
- EStore the plaintext data key in AWS Systems Manager Parameter Store as a SecureString parameter to allow backend components to decrypt the file.
Answer
The correct actions are calling the KMS GenerateDataKey API operation to obtain the plaintext and encrypted data keys, and encrypting the file locally using the plaintext data key while discarding it from memory afterwards.
To implement client-side envelope encryption for large files (such as ), the developer must first call the KMS GenerateDataKey API operation to retrieve both a plaintext and an encrypted data key. The developer then encrypts the file locally using the plaintext key and immediately deletes the plaintext key from memory to prevent leakage, leaving only the encrypted data and the encrypted data key.
Step-by-Step Solution
Key Concept
AWS KMS Envelope Encryption Workflow for Large Payloads