AWS Certified Solutions Architect – Professional — Question 951

A company is migrating its on-premises build artifact server to an AWS solution. The current system consists of an Apache HTTP server that serves artifacts to clients on the local network, restricted by the perimeter firewall. The artifact consumers are largely build automation scripts that download artifacts via anonymous
HTTP, which the company will be unable to modify within its migration timetable.
The company decides to move the solution to Amazon S3 static website hosting. The artifact consumers will be migrated to Amazon EC2 instances located within both public and private subnets in a virtual private cloud (VPC).
Which solution will permit the artifact consumers to download artifacts without modifying the existing automation scripts?

Answer options

Correct answer: B

Explanation

Since the legacy build scripts perform anonymous HTTP requests and cannot be modified, IAM authentication using instance profiles (Option C) is not feasible. Using a VPC gateway endpoint allows the S3 bucket policy to permit anonymous access securely by restricting requests to only those originating from the specific VPC endpoint ID using the aws:sourceVpce condition. Option D is incorrect because S3 gateway endpoints do not preserve the private VPC CIDR IPs in a way that allows aws:SourceIp filtering, and Option A does not cover instances in public subnets which bypass the NAT gateway.