
Answer-first summary for fast verification
Answer: Use Envelope Encryption and reference the data as file within the code
Correct option: Use Envelope Encryption and reference the data as file within the code While AWS KMS does support sending data up to 4 KB to be encrypted directly, envelope encryption can offer significant performance benefits. When you encrypt data directly with AWS KMS it must be transferred over the network. Envelope encryption reduces the network load since only the request and delivery of the much smaller data key go over the network. The data key is used locally in your application or encrypting AWS service, avoiding the need to send the entire block of data to AWS KMS and suffer network latency. AWS Lambda environment variables can have a maximum size of 4 KB. Additionally, the direct 'Encrypt' API of KMS also has an upper limit of 4 KB for the data payload. To encrypt 1 MB, you need to use the Encryption SDK and pack the encrypted file with the lambda function. Incorrect options: Use KMS direct encryption and store as file - You can only encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such as an RSA key, a database password, or other sensitive information, so this option is not correct for the given use-case. Use Envelope Encryption and store as an environment variable - Environment variables must not exceed 4 KB, so this option is not correct for the given use-case. Use KMS Encryption and store as an environment variable - You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such as an RSA key, a database password, or other sensitive information. Lambda Environment variables must not exceed 4 KB. So this option is not correct for the given use-case.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As an AWS Certified Developer Associate, you have launched several AWS Lambda functions that are implemented in Java. A new requirement necessitates that more than 1MB of data needs to be passed to these functions, and this data must be both encrypted before it's passed and decrypted during the function's runtime.
Which of the following methods is most suitable for addressing this use case?
A
Use Envelope Encryption and reference the data as file within the code
B
Use KMS Encryption and store as environment variable
C
Use Envelope Encryption and store as environment variable
D
Use KMS direct encryption and store as file
No comments yet.