Private S3 Access From EC2 Without Internet
An application runs on an Amazon EC2 instance in a VPC. The application processes logs that are stored in an Amazon S3 bucket. The EC2 instance needs to access the S3 bucket without connectivity to the internet. Which solution will provide private network connectivity to Amazon S3?
Community Insight
The question tests knowledge of VPC endpoint types for private AWS service access; the trap is choosing an IAM-based option (instance profile) or an indirect log-shipping path that never establishes private network connectivity.
This SAA-C03 scenario asks how an EC2 instance in a VPC can reach an Amazon S3 bucket entirely over the AWS network, with no internet gateway, NAT device, or public egress. The page confirms that a gateway VPC endpoint for S3 (option A) is the correct private-connectivity solution, while the other options address authorization, log routing, or an unrelated API front end.
Option C is the most tempting wrong pick: an instance profile grants the EC2 instance IAM permissions to call S3, but it changes nothing about the network path, so traffic still needs an internet gateway or NAT device to leave the VPC.
Community Discussion (79 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
A gateway VPC endpoint is the AWS-native construct that gives a VPC private, network-level access to Amazon S3 without traversing the public internet. Once created, it is automatically added as a target in the VPC's route tables for the S3 prefix lists, so traffic from the EC2 instance stays on the AWS global network and no internet gateway or NAT device is required. Gateway endpoints for S3 and DynamoDB also incur no hourly charge, and you can further lock them down with endpoint policies and the aws:VpcSourceIp condition key. This directly satisfies the requirement of "private network connectivity to Amazon S3."Why the Other Options Are Wrong
Option B routes logs through CloudWatch Logs and then exports them to S3, which is an indirect data-pipeline workaround rather than network connectivity, and export can take up to 12 hours plus it incurs extra ingestion and storage cost. Option C is purely an authorization control: an instance profile attaches an IAM role so S3 calls are permitted, but the underlying requests would still need internet egress, so the stated requirement is unmet. Option D misapplies PrivateLink, because API Gateway front-ending an S3 endpoint is not a supported design; S3 is reached via gateway or interface VPC endpoints, not through an API Gateway with a private link. Option D also adds an unnecessary API layer and latency for simple object access.Community Comment Notes
Community consensus strongly supports option A, with PhucVuu noting that a "Gateway VPC endpoint can connect to S3 bucket privately without additional cost" and D2w adding that a VPC endpoint lets you "connect to AWS services using a private network instead of using the public Internet." Andreshere emphasizes that instance profiles "is not related to network connectivity," while rxwcl points out option D "would not provide private network connectivity" either. Aayush_786 summarizes the rule of thumb well: use a gateway endpoint for S3 and DynamoDB, an interface endpoint via PrivateLink for other AWS services, and PrivateLink for third-party SaaS or cross-account access.Official Reference
Exam Strategy
When a question says "without internet connectivity" or "private connectivity to an AWS service," first identify which VPC endpoint type supports that service (S3 and DynamoDB = gateway endpoint; most others = interface endpoint/PrivateLink), then confirm the option also addresses the network path rather than only IAM permissions.
Frequently Asked Questions
Why doesn't an instance profile give the EC2 instance private access to S3?
An instance profile only attaches an IAM role so S3 API calls are authorized; it does not change the network path, so traffic would still require an internet gateway or NAT device.
Should I use an interface endpoint instead of a gateway endpoint for S3?
No. S3 and DynamoDB support gateway endpoints, which are free and route via route tables; interface endpoints (PrivateLink) are used for other AWS services.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →