A developer is building an application that needs to encrypt files locally before uploading them to Amazon S3. Each file is approximately in size. The encryption process must use client-side envelope encryption with a Customer Managed Key (CMK) stored in AWS KMS, minimizing network overhead and API requests. Which two actions must the developer perform to complete this client-side encryption process?
- Call the KMS GenerateDataKey API passing the Customer Managed Key ID to retrieve a plaintext data key and a ciphertext data key.Cevap
- Encrypt the file locally using the plaintext data key, store the ciphertext data key alongside the encrypted file in Amazon S3, and delete the plaintext data key from memory.Cevap
- CCall the KMS Encrypt API directly with the file payload to encrypt the entire file before transmitting it.
- DCall the KMS GenerateDataKeyWithoutPlaintext API and use the returned ciphertext data key to encrypt the files locally.
- EStore the plaintext data key in AWS Systems Manager Parameter Store as a SecureString, and retrieve it for each file upload.
Cevap
To perform client-side envelope encryption, the developer must call the KMS GenerateDataKey API to obtain a plaintext and ciphertext data key, use the plaintext data key to encrypt the file locally, store the ciphertext data key alongside the encrypted file, and destroy the plaintext data key from memory.
The correct options describe the standard client-side envelope encryption workflow. The developer calls the GenerateDataKey API to obtain both a plaintext data key and a ciphertext data key. The plaintext key is used to encrypt the file locally, after which the plaintext key is discarded from memory. The ciphertext data key is stored alongside the encrypted file in S3 so that it can be decrypted later by calling the KMS Decrypt API.
Adım Adım Çözüm
Anahtar Kavram
AWS KMS Envelope Encryption Workflow for Large Payloads
Tahmini Süre:1m 30s