exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 117 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 117
Topic #: 1
[All AWS Certified Developer Associate Questions]

A Lambda function processes data before sending it to a downstream service. Each piece of data is approximately 1MB in size. After a security audit, the function is now required to encrypt the data before sending it downstream.
Which API call is required to perform the encryption?

  • A. Pass the data to the KMS ReEncrypt API for encryption.
  • B. Use the KMS GenerateDataKey API to get an encryption key.
  • C. Use the KMS GenerateDataKeyWithoutPlainText API to get an encryption key.
  • D. Pass the data to KMS as part of the Encrypt API for encryption.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
laxit
Highly Voted 3 years, 3 months ago
GenerateDataKev spelling error bros 👊
upvoted 7 times
Groot2
2 years, 1 month ago
The spelling error is MB instead of kB?
upvoted 1 times
...
...
tuongthuy
Highly Voted 1 year, 9 months ago
Selected Answer: B
For the exam: anything over 4 KB of data that needs to be encrypted must use the Envelope Encryption == GenerateDataKey API So, the correct answer is B
upvoted 6 times
...
sweetheatmn
Most Recent 1 year, 6 months ago
Selected Answer: B
D is incorrect because it encrypts small data not exceeding 4kb B is correct where we generate a data key and use Envelope encryption https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html
upvoted 1 times
...
sweetheatmn
1 year, 6 months ago
D is incorrect because it encrypts small data not exceeding 4kb B is correct where we generate a data key and use Envelope encryption https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html
upvoted 1 times
...
AWSdeveloper08
1 year, 9 months ago
Selected Answer: D
Answer is D - since passing the data to KMS will encrypt the data Option C - This will just provide you the key for further encryption
upvoted 1 times
ninomfr64
1 year, 8 months ago
the encrypt API encrypts plaintext of up to 4,096 bytes using a KMS key https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html
upvoted 1 times
...
...
ezredame
1 year, 11 months ago
To be able to perform the encryption it should be D.
upvoted 1 times
...
pranay_2406
1 year, 11 months ago
Selected Answer: D
To perform encryption on the data before sending it downstream in a Lambda function, you would use option D: Pass the data to KMS as part of the Encrypt API for encryption. AWS Key Management Service (KMS) provides a service API called Encrypt, which is used to encrypt plaintext data using a customer master key (CMK) managed by KMS. The Encrypt API call takes the plaintext data as input and returns the ciphertext, which represents the encrypted data. In your scenario, you would pass the data to KMS using the Encrypt API to encrypt it before sending it downstream. This ensures that the data is protected while in transit to the downstream service. You can specify the CMK to be used for encryption, and KMS will handle the encryption process using the specified key.
upvoted 1 times
pranay_2406
1 year, 11 months ago
It's worth noting that KMS allows you to use envelope encryption, where the data is encrypted with a data key, and that data key is then encrypted with the CMK. This provides an additional layer of security. However, in this case, since the data is approximately 1MB in size, it's not necessary to generate a data key explicitly using the GenerateDataKey API (options B and C). Instead, you can directly use the Encrypt API to encrypt the data with the CMK.
upvoted 1 times
...
...
Syre
2 years ago
Selected Answer: D
D is the answer here. Option B is incorrect. The GenerateDataKey API is used to generate an encrypted data key that can be used to encrypt or decrypt data, but it does not actually perform encryption itself. The data key would need to be used with a separate encryption method, such as AWS Encryption SDK or an encryption algorithm like AES, to encrypt the data.
upvoted 2 times
...
shahs10
2 years ago
Selected Answer: D
Answer should be Option D as B and C get you the encryption key. They are no the API calls for encrypting data.
upvoted 2 times
...
JuanFe
2 years, 2 months ago
why not d? I can't understand it. Option B is for files which size is over 4MB and option D is the most suitable answer for me.
upvoted 2 times
Jay1299
2 years, 1 month ago
4KB* is the max size for encryption hence GenerateDataKey API
upvoted 2 times
...
...
sichilam
2 years, 3 months ago
B is correct
upvoted 1 times
...
JAMG54
2 years, 10 months ago
why not C? KMS only supports a max of kb of data for encryption and the questions says 1MB
upvoted 1 times
...
Ivanyan
3 years ago
Selected Answer: B
B. Use the KMS GenerateDataKey API to get an encryption key.
upvoted 1 times
...
weilun_tann
3 years, 2 months ago
Selected Answer: B
B. https://docs.aws.amazon.com/kms/latest/developerguide/programming-encryption.html The examples in this topic use the Encrypt, Decrypt, and ReEncrypt operations in the AWS KMS API. These operations are designed to encrypt and decrypt data keys. They use an AWS KMS keys in the encryption operations and they cannot accept more than 4 KB (4096 bytes) of data. Although you might use them to encrypt small amounts of data, such as a password or RSA key, they are not designed to encrypt application data.
upvoted 4 times
...
ven1234
3 years, 3 months ago
Ans: B
upvoted 3 times
...
ccamile
3 years, 3 months ago
I think is B
upvoted 3 times
...
CHRIS12722222
3 years, 3 months ago
C. A more secured option since lambda needs to process data before encrypting the data
upvoted 1 times
Vlasto
3 years, 2 months ago
You can process the data and then call the KMS when you need the key.
upvoted 1 times
...
mevlt
3 years, 3 months ago
it says now.
upvoted 2 times
CHRIS12722222
3 years, 2 months ago
Agreed
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago