A developer is building a document archiving application where PDF files of approximately each must be encrypted on the client side before they are uploaded to an Amazon S3 bucket. The encryption must be performed using an AWS KMS customer managed key. Which two steps must the developer perform to implement this encryption process? (Select two.)
- Call the GenerateDataKey API operation using the customer managed key identifier to receive a plaintext data key and an encrypted data key.Cevap
- Encrypt the PDF file locally using the plaintext data key, delete the plaintext data key from memory, and upload the encrypted PDF along with the encrypted data key to Amazon S3.Cevap
- CCall the Encrypt API operation directly, passing the entire PDF file as the plaintext payload to be encrypted by the customer managed key.
- DCall the GenerateDataKeyWithoutPlaintext API operation to obtain the encrypted data key, and use the encrypted data key directly to perform symmetric encryption on the PDF file.
- ECall the GetPublicKey API operation to download the private key material of the customer managed key to perform local symmetric encryption.
Cevap
The developer must call the GenerateDataKey API operation to retrieve both the plaintext and encrypted data keys, encrypt the PDF locally with the plaintext data key, delete the plaintext data key from memory, and then upload the encrypted PDF and the encrypted data key to Amazon S3.
For files larger than , direct encryption via AWS KMS is not possible due to size limitations. Instead, client-side envelope encryption must be used. Under this model, the developer calls the GenerateDataKey API operation to obtain both a plaintext data key and an encrypted data key. The plaintext data key is used to encrypt the file locally, after which the plaintext key is deleted from memory to maintain security. Finally, the encrypted PDF and the encrypted data key are uploaded together to Amazon S3 so that the file can be decrypted in the future using the Decrypt API on the encrypted data key.
Adım Adım Çözüm
Anahtar Kavram
AWS KMS Envelope Encryption Workflow