AWS Developer DVA-C02 · Security · hard

A developer needs to encrypt a 50 MB sensitive PDF file locally on an application server before uploading it to an on-premises archive, using an AWS KMS Customer Managed Key (CMK). However, the AWS KMS Encrypt API operation accepts a maximum plaintext payload of 4,096 bytes (4 KB). Which two steps implement AWS KMS Envelope Encryption to encrypt the 50 MB file? (Select two.)

Published · Last updated · checked before publication — how we verify questions

Options

  • ASplit the 50 MB PDF into 13,000 chunks of 4 KB and call kms:Encrypt 13,000 times
  • BCall kms:GenerateDataKey to obtain a plaintext data key and an encrypted data keyCorrect answer
  • CEncrypt the 50 MB file locally with the plaintext key and store the encrypted keyCorrect answer
  • DExport the raw KMS root key material in cleartext to the server's /tmp directory

Answers: B. Call kms:GenerateDataKey to obtain a plaintext data key and an encrypted data key; C. Encrypt the 50 MB file locally with the plaintext key and store the encrypted key

Because kms:Encrypt is limited to 4 KB, files larger than 4 KB use Envelope Encryption: (B) call kms:GenerateDataKey to receive both a plaintext data key and an encrypted data key (CiphertextBlob) (B), and (C) use the plaintext data key locally to encrypt the 50 MB file, store the encrypted data key alongside the encrypted file, and immediately wipe the plaintext data key from memory (C).

Why the other options are wrong

  • A. Split the 50 MB PDF into 13,000 chunks of 4 KB and call kms:Encrypt 13,000 times — Making 13,000 network calls to kms:Encrypt throttles the KMS API quota and adds extreme latency.
  • D. Export the raw KMS root key material in cleartext to the server's /tmp directory — AWS KMS never exports the raw key material of a KMS-generated CMK in cleartext.

All Security questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.