SAA-C03 practice question 23 of 35

A company runs its legacy web application on AWS. The web application server runs on an Amazon EC2 instance in the public subnet of a VPC. The web…

Full set: 972 questions

Domain Design Secure Architectures

A company runs its legacy web application on AWS. The web application server runs on an Amazon EC2 instance in the public subnet of a VPC. The web application server collects images from customers and stores the image files in a locally attached Amazon Elastic Block Store (Amazon EBS) volume. The image files are uploaded every night to an Amazon S3 bucket for backup. A solutions architect discovers that the image files are being uploaded to Amazon S3 through the public endpoint. The solutions architect needs to ensure that traffic to Amazon S3 does not use the public endpoint.
Answer options
A: Create a gateway VPC endpoint for the S3 bucket that has the necessary permissions for the VPC. Configure the subnet route table to use the gateway VPC endpoint. Correct answer
B: Move the S3 bucket inside the VPC. Configure the subnet route table to access the S3 bucket through private IP addresses.
C: Create an Amazon S3 access point for the Amazon EC2 instance inside the VPC. Configure the web application to upload by using the Amazon S3 access point.
D: Configure an AWS Direct Connect connection between the VPC that has the Amazon EC2 instance and Amazon S3 to provide a dedicated network path.
Correct Answer:
A. Create a gateway VPC endpoint for the S3 bucket that has the necessary permissions for the VPC. Configure the subnet route table to use the gateway VPC endpoint.
Explanation

A gateway VPC endpoint for Amazon S3 provides a secure, private connection between resources in a VPC and the S3 service. By creating a gateway endpoint and adding a route to the subnet's route table that directs S3-bound traffic to this endpoint, the EC2 instance can communicate with S3 without using an internet gateway or NAT device. This ensures that the data transfer remains entirely within the AWS network, directly addressing the requirement to avoid the public S3 endpoint. This is the standard, most direct, and cost-effective solution for this scenario.

Why Incorrect

B: Amazon S3 is a global service that does not reside within a VPC. It is architecturally impossible to move an S3 bucket "inside" a VPC. C: An S3 access point simplifies access management policies but does not create the private network path. A VPC endpoint is still required to route traffic privately. D: AWS Direct Connect is used to establish a dedicated private connection from an on-premises data center to AWS, not for connecting services within AWS.

References

1. Amazon VPC User Guide

Gateway VPC endpoints: "A gateway endpoint is a gateway that you specify as a target for a route in your route table for traffic destined to a supported AWS service... You can use a gateway endpoint to allow instances in your VPC to access Amazon S3... without an internet gateway." (See section: "Gateway VPC endpoints").

2. Amazon VPC User Guide

VPC endpoints for Amazon S3: "Amazon S3 supports gateway endpoints. If you have resources in a private subnet in your VPC that need to access Amazon S3

you can use a gateway endpoint for Amazon S3." (See section: "VPC endpoints for Amazon S3").

3. Amazon S3 User Guide

Restricting access to an Amazon S3 access point from a virtual private cloud: "To enforce that all requests to your access point are from your VPC

you can use a VPC endpoint." This document clarifies that the endpoint provides the network path

while the access point provides policy control. (See section: "Restricting access to an Amazon S3 access point from a virtual private cloud").

4. AWS Direct Connect User Guide

What is AWS Direct Connect?: "AWS Direct Connect is a cloud service solution that makes it easy to establish a dedicated network connection from your premises to AWS." This defines its purpose as connecting external premises to AWS

not for intra-AWS service communication. (See section: "What is AWS Direct Connect?").

Scroll to Top