An application must encrypt hundreds of video files within the application before storing them, using a unique key per video. How should the developer implement encryption in the application?
Choose an answer
Tap an option to check your answer.
Correct answer: Call KMS GenerateDataKey to obtain a data key, encrypt each video with that data key, and store both the encrypted data key and the encrypted data..
Why this is the answer
The correct approach is to use KMS GenerateDataKey. This API call returns a unique data key that can be used by the application to encrypt each video file. The data key itself is encrypted by KMS, ensuring its protection. The application then stores both the encrypted video file and the encrypted data key alongside it. This method provides a unique encryption key per video, as required, and leverages KMS for secure key management without sending large video files to KMS for direct encryption. Using the KMS Encrypt API directly for hundreds of video files would be inefficient and costly, as KMS has payload size limits and is not designed for bulk data encryption. Generating an encryption key with a cryptography library inside the application without KMS integration would mean the application is responsible for key management and protection, which is less secure and more complex. Uploading to S3 with server-side encryption is a good option for data at rest in S3, but the question specifies encrypting within the application before storage, implying the encryption logic needs to be handled by the application itself, not just by S3.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed