A real estate company has an internal app where agents upload photos and videos to S3, with metadata in DynamoDB. The S3 bucket publishes PUT events to an SQS queue; an EC2 compute cluster polls SQS, processes objects, updates DynamoDB, and replaces objects. The EC2 instances must not have public IPs. Which network design is the most cost-effective as usage grows?
Choose an answer
Tap an option to check your answer.
Correct answer: Place the EC2 instances in a private subnet. Create an interface VPC endpoint for Amazon SQS. Create gateway VPC endpoints for Amazon S3 and DynamoDB..
Why this is the answer
The correct option uses private subnets for EC2 instances and VPC endpoints for AWS services, which is the most secure and cost-effective solution for private communication. Interface endpoints for SQS allow private access to the service without traversing the public internet. Gateway endpoints for S3 and DynamoDB are free and provide private connectivity to these services. This design avoids NAT Gateway costs, which can be significant as data transfer grows, and keeps all traffic within the AWS network. Incorrect options: Placing EC2 in a public subnet with no public IP still requires a NAT Gateway or similar for outbound internet access to AWS services, which isn't the most cost-effective for private communication. Using a NAT Gateway introduces costs for data processing and hourly usage, which can become expensive with increased usage. The last incorrect option incorrectly assigns endpoint types (gateway for SQS, interface for S3/DynamoDB). SQS only supports interface endpoints, while S3 and DynamoDB support gateway endpoints (which are free).
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed