A Lambda function is set up to read an object in an S3 bucket that is encrypted with a KMS key. The Lambda execution role includes permissions to access the S3 bucket, but the function fails to retrieve the object's contents. What is the most likely reason for the error?
Choose an answer
Tap an option to check your answer.
Correct answer: The Lambda function's execution role does not have the necessary permissions to access the KMS key that can decrypt the S3 object..
Why this is the answer
The most likely reason for the error is that the Lambda function's execution role lacks permissions to use the KMS key for decryption. Even with S3 bucket access, if an object is encrypted with KMS, the principal (in this case, the Lambda execution role) must have kms:Decrypt permissions on the specific KMS key. Without these permissions, S3 will deny access to the encrypted object. Incorrect options: Misconfigured S3 bucket permissions are less likely if the role "includes permissions to access the S3 bucket." The problem specifically states the Lambda has S3 access. An outdated SDK version is generally not the cause of a permission-related access failure; AWS SDKs are backward compatible for core functionalities. Latency due to different AWS Regions might cause timeouts or slow performance, but it would not typically result in a direct access denial when permissions are otherwise correct.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed