AWS Certified Advanced Networking – Specialty (ANS-C01) — Question 53

A company plans to deploy a two-tier web application to a new VPC in a single AWS Region. The company has configured the VPC with an internet gateway and four subnets. Two of the subnets are public and have default routes that point to the internet gateway. Two of the subnets are private and share a route table that does not have a default route.
The application will run on a set of Amazon EC2 instances that will be deployed behind an external Application Load Balancer. The EC2 instances must not be directly accessible from the internet. The application will use an Amazon S3 bucket in the same Region to store data. The application will invoke S3 GET API operations and S3 PUT API operations from the EC2 instances. A network engineer must design a VPC architecture that minimizes data transfer cost.
Which solution will meet these requirements?

Answer options

Correct answer: C

Explanation

The correct answer is C because deploying the EC2 instances in private subnets with an S3 gateway endpoint allows direct access to S3 without incurring data transfer costs through the internet. The other options either place the EC2 instances in public subnets, which contradicts the requirement of not being directly accessible from the internet, or involve NAT gateways, which would not minimize costs effectively.