A company runs an application in a VPC with public and private subnets across multiple Availability Zones. The application runs on EC2 instances in private subnets and uses an Amazon SQS queue. Design a secure connection between the EC2 instances and the SQS queue. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Implement an interface VPC endpoint for Amazon SQS. Configure the endpoint to use the private subnets. Add a security group to the endpoint that has an inbound rule allowing traffic from the EC2 instances in the private subnets..
Why this is the answer
The correct solution uses an interface VPC endpoint for SQS, which allows private connectivity from EC2 instances in private subnets to SQS without traversing the internet. Configuring the endpoint in private subnets ensures traffic remains within the private network. A security group on the endpoint, allowing inbound traffic from the EC2 instances' security groups, correctly restricts access to authorized sources. The other options are incorrect because: Using public subnets for the endpoint would expose it to the internet, which is less secure and unnecessary for private subnet communication. A gateway endpoint is not available for SQS; it's used for S3 and DynamoDB. A NAT Gateway is for outbound internet access from private subnets, not for private connectivity to AWS services like SQS.
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