Add an S3 gateway endpoint and a KMS interface endpoint with private DNS in Account B's VPC
Short answer
AC An S3 gateway endpoint and a KMS interface endpoint with private DNS keep all cross-account API calls on the AWS network.
Question
Key Takeaways
S3 is accessed from a VPC through a gateway endpoint (A), not an interface endpoint. KMS is accessed through an interface endpoint (C) and private DNS must be on so the Kms* API hostnames resolve to the private endpoint IP rather than the public one—otherwise the code would still reach KMS publicly. Disabling private DNS (D) would break transparent resolution. A+C is correct; the BC variant is wrong because S3 uses a gateway endpoint.
Account B's EC2 fleet reads/writes an Account A S3 bucket (KMS-encrypted) and must make no AWS API calls over the internet, with no code change. Create an S3 gateway VPC endpoint in Account B's VPC (S3 is reached via gateway endpoints) and an interface VPC endpoint for KMS with private DNS enabled (so the KMS API resolves to the private endpoint). Both keep S3 and KMS traffic on the AWS network.
Common mistake: Choosing an interface endpoint for S3 (B)—S3 uses gateway endpoints from a VPC, not interface endpoints. Turning private DNS off for the KMS interface endpoint (D)—without private DNS the KMS SDK still resolves the public hostname and traffic would leave the VPC. A+C (gateway S3 + interface KMS with private DNS) is the correct pair.
Expert Analysis
Why the Answer Is Correct
An S3 gateway VPC endpoint (A) routes Account B's S3 API calls over the AWS network via the endpoint's prefix-list route, avoiding the internet; S3 is specifically designed for gateway endpoints. A KMS interface VPC endpoint with private DNS enabled (C) makes the Kms* API hostnames resolve to private IPs inside the VPC, so Decrypt/GenerateDataKey calls stay off the public internet—and no application code changes because the SDK uses the same endpoint names. A and C meet both requirements.
Why the Other Options Are Wrong
B uses an interface endpoint for S3, which is not how S3 is reached from a VPC (gateway endpoint is). D turns private DNS off for the KMS endpoint, so the KMS API would still resolve publicly and traffic would traverse the internet, violating the requirement. A and C are correct.
Community Comment Notes
Community voted A,C (100). Commenters clarified S3 uses a gateway endpoint and KMS an interface endpoint with private DNS on; one dissenter proposed B,C but was corrected that S3 is gateway-based. A,C confirmed.
Official Reference
- https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html
- https://docs.aws.amazon.com/kms/latest/developerguide/kms-vpc-endpoint.html
These links open the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 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 7
-
komik_101 👍 2I will going to AC, when I look at the question , I saw "fleet of EC2" this means Account B have many EC2. Go to link. you will see many topology, and you will understand what I mean. https://aws.amazon.com/tr/blogs/architecture/choosing-your-vpc-endpoint-strategy-for-amazon-s3/
-
nznzwell 👍 1All the comments regarding s3 cannot be accessed by an interface endpoint is wrong - instead, s3 can use both gateway endpoints and interface endpoints: https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html B is not correct as the question does not mention any connectivity between Account A and B so private routing is not possible.
-
3e88bd8 👍 1AC: Amazon S3 uses a gateway VPC endpoint rather than an interface VPC endpoint for access from a VPC.
-
div05jkjl 👍 1BC. https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html
-
VPNalumni 👍 1AC . B is wrong no interface endpoint for s3
Show 2 more comments
-
mikelord 👍 1BC for me as well.
-
jdx000 👍 1A and C
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.