An IoT analytics platform receives telemetry batches of approximately in size from edge gateways. The data must be encrypted client-side before it is transmitted to Amazon S3. A developer is tasked with implementing this encryption using a Customer Managed Key (CMK) in AWS KMS. Which two actions must the developer perform to successfully implement this encryption workflow? (Select TWO.)
- Call the AWS KMS GenerateDataKey API specifying the Customer Managed Key to obtain both a plaintext data key and a ciphertext data key.Answer
- Encrypt the telemetry batch locally using the plaintext data key, and then discard the plaintext data key from memory.Answer
- CCall the AWS KMS Encrypt API directly, passing the telemetry batch as the plaintext parameter.
- DCall the AWS KMS GenerateDataKeyWithoutPlaintext API to retrieve only the ciphertext data key, and decrypt it locally using the AWS SDK.
- EStore the plaintext data key in AWS Systems Manager Parameter Store as a secure string with automatic rotation enabled.
Answer
To encrypt payloads larger than client-side, the developer must use envelope encryption. This is done by calling GenerateDataKey to obtain both plaintext and ciphertext data keys, encrypting the data locally with the plaintext key, and then discarding the plaintext key from memory.
For payloads larger than (such as the telemetry batch), direct encryption using AWS KMS is not possible. The developer must implement envelope encryption. This involves calling the `GenerateDataKey` API to get both a plaintext data key and a ciphertext data key. The plaintext data key is used to encrypt the telemetry batch locally and is then deleted from memory. The ciphertext data key is stored with the encrypted data in Amazon S3 for later decryption.
Step-by-Step Solution
Key Concept
AWS KMS envelope encryption workflow for handling large datasets.
Estimated Time:1m 30s