A company's application runs in a VPC and stores sensitive data in Amazon S3. The application's Amazon EC2 instances are located in a private subnet with a NAT gateway deployed in a public subnet to provide access to Amazon S3. The S3 bucket is located in the same AWS Region as the EC2 instances. The company wants to ensure that this bucket can be accessed only from the VPC where the application resides. Which changes should a network engineer make to the architecture to meet these requirements?
Select an option, then click Submit answer.
Reference / correct answer:
Deploy an S3 VPC endpoint in the VPC where the application resides. Configure an S3 bucket policy with a condition to allow access only from the VPC endpoint.
Most accepted answer: B. Deploy an S3 VPC endpoint in the VPC where the application resides. Configure an S3 bucket policy with a condition to allow access only from the VPC endpoint.
Community votes: B=1
The correct answer is B. It will restrict access to connection from the VPC endpoint, that would be reachable to the whole VPC. The question explicitly mentions that the S3 Bucket should allow access from the whole VPC. A. You cannot create a bucket on a VPC C. You will connect through the public internet therefore you'll see the public IPs of the VPC. Not a good solution. D. Roles can be assigned to EC2 instances in other VPCs, allowing unwanted access. upvoted 10 times sapien45 4 years, 4 months ago Reponse is B. Had similar question is AWS Associate Architect upvoted 2 times ...
Reponse is B. Had similar question is AWS Associate Architect upvoted 2 times
Selected Answer: B Answer B upvoted 1 times
D A. Wrong. S3 is a global service, you can't create S3 in a specified VPC. B. Wrong. Any other applications can access to S3 through endpoint C. Wrong. Too broad range, same as B. D. Correct. upvoted 1 times clooudy 4 years, 2 months ago D is wrong - Ans is B upvoted 1 times ... walkwolf3 4 years, 9 months ago C. Won't work since S3 access is public by default, S3 will see public IP ranges instead of VPC's private CIDR. Considering the S3 bucket can be accessed from VPC, while answer D restrict the access to the application instances, my retake is B. upvoted 2 times Luscious 4 years, 8 months ago D is wrong as this limits access to the S3 buckets to only endpoints with the role assigned. The question asks for access for VPC resources (keyword VPC) to have access to the S3 buckets. No other restriction was stated. The best way to achieve that would be to attach an S3 gateway endpoint to the VPC that facilitates access to the S3 buckets, with restrictions on the buckets' policies to the gateway endpoint. This ensures that VPC resources only will have access to the S3 buckets. B therefore is the right answer here. upvoted 2 times ... ...
D is wrong - Ans is B upvoted 1 times