AWS Certified Developer – Associate (DVA-C02) — Question 448

An AWS Lambda function generates a 3 MB JSON file and then uploads it to an Amazon S3 bucket daily. The file contains sensitive information, so the developer must ensure that it is encrypted before uploading to the bucket.

Which of the following modifications should the developer make to ensure that the data is encrypted before uploading it to the bucket?

Answer options

Correct answer: C

Explanation

To perform client-side encryption before uploading to Amazon S3, the developer must use the AWS KMS GenerateDataKey API to obtain a data key, which is then used to encrypt the 3 MB file locally within the Lambda function. Options A, B, and D are incorrect because they either refer to server-side encryption methods or attempt to use KMS keys directly in the code without generating the required local data key for envelope encryption.