Restore S3 GetObject access by fixing ListBucket, KMS Decrypt, and the gateway-endpoint bucket policy
Short answer
ADE Missing s3:ListBucket, missing kms:Decrypt on the key policy, and a bucket policy not allowing the gateway endpoint block GetObject.
Question
Key Takeaways
Reading a KMS-encrypted object through a gateway endpoint needs three permissions aligned: S3 read/list permission on the instance profile, kms:Decrypt on the CMK key policy for that principal, and a bucket policy that permits the gateway endpoint. ListParts is for multipart uploads and ListKeys is for key enumeration—neither affects GetObject. A, D, E are the failure factors.
An EC2 app reaches S3 only through a gateway VPC endpoint, and objects are KMS-CMK encrypted. Three things can block GetObject: the instance profile lacks s3:ListBucket (needed to enumerate/resolve the objects it fetches), the KMS key policy does not grant kms:Decrypt to the instance profile (required to decrypt the object on read), and the S3 bucket policy does not allow access from the gateway VPC endpoint (so even the endpoint path is denied). s3:ListParts (B) and kms:ListKeys (C) are unrelated to reading objects.
Common mistake: Picking C (missing kms:ListKeys)—ListKeys only lists key IDs and is not required to decrypt an object. Picking B (missing s3:ListParts)—ListParts is for multipart upload completion, irrelevant to reading. The real blockers are ListBucket scope, kms:Decrypt, and the endpoint bucket policy.
Expert Analysis
Why the Answer Is Correct
A (missing s3:ListBucket on the instance profile) blocks the app from resolving/listing the objects it needs. D (missing kms:Decrypt on the CMK key policy for the instance profile) blocks decryption of the encrypted object on read. E (bucket policy not allowing the gateway VPC endpoint) denies even the endpoint path to S3. All three independently prevent GetObject success. These are the factors that could cause the failure.
Why the Other Options Are Wrong
B (missing s3:ListParts) applies to multipart upload completion, not object reads, so it does not block GetObject. C (missing kms:ListKeys) only affects enumerating key IDs, not decrypting a specific object—kms:Decrypt is what is needed. A, D, E are the correct set of factors.
Community Comment Notes
Community voted A,D,E (100). Commenters called A and E obvious and noted D (KMS Decrypt on the key policy for the instance profile) as the less-obvious blocker. B and C were excluded as unrelated to reading encrypted objects.
Official Reference
- https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
- https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html
These links open the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer ADE. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
Zek 👍 4ADE -Agree See similar question a public discussion thread on this question
-
TareDHakim 👍 1A&E are obvious ones, For D. There's a similar scenario described here,
-
navid1365 👍 2A, D, E are correct
-
Certified101 👍 2ADE look right
-
FunkyFresco 👍 1ADE match with the question.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.