A developer is writing an AWS Lambda function that receives customer registration data payloads of approximately each. The security policy requires this data to be encrypted client-side using a Customer Managed Key (CMK) in AWS KMS before it is written to an Amazon DynamoDB table. Which of the following steps must the developer perform to encrypt the payload and store it in DynamoDB? (Select TWO.)
- Call the GenerateDataKey API operation on AWS KMS using the Customer Managed Key to receive both a plaintext data key and an encrypted data key.Cevap
- Encrypt the payload locally using the plaintext data key, store both the encrypted payload and the encrypted data key in the DynamoDB table, and erase the plaintext data key from memory.Cevap
- CCall the Encrypt API operation on AWS KMS directly, passing the entire payload and the Customer Managed Key identifier.
- DCall the GenerateDataKeyWithoutPlaintext API operation on AWS KMS to get an encrypted data key, decrypt the key locally using the AWS SDK offline utilities, and encrypt the payload.
- EEncrypt the payload locally using the plaintext data key, and store the plaintext data key in AWS Systems Manager Parameter Store with a secure string type for later decryption.
Cevap
The developer must call the GenerateDataKey API operation to obtain the plaintext and encrypted data keys, encrypt the data locally, store the encrypted payload and the encrypted data key in DynamoDB, and immediately purge the plaintext data key from memory.
Because the payload () is larger than the maximum allowed by the direct AWS KMS Encrypt API, envelope encryption is required. The developer calls GenerateDataKey to obtain both the plaintext data key (for local encryption) and the encrypted data key. After local encryption, the plaintext key is discarded from memory, and the encrypted data key is stored alongside the encrypted payload in DynamoDB.
Adım Adım Çözüm
Anahtar Kavram
KMS Client-Side Envelope Encryption and Payload Size Limits
Tahmini Süre:1m 30s