AWS Certified Developer – Associate (DVA-C02) — Question 150

A company has multiple Amazon VPC endpoints in the same VPC. A developer needs to configure an Amazon S3 bucket policy so users can access an S3 bucket only by using these VPC endpoints.

Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because it allows specifying multiple VPC endpoint IDs directly in the S3 bucket policy, ensuring only requests from those endpoints can access the bucket. Option A is incorrect as it suggests multiple policies instead of a single one. Option B does not use the correct condition for VPC endpoints. Option C also fails as it uses a wildcard instead of specifying the actual endpoint IDs, which does not meet the requirement.