AWS Certified Solutions Architect – Associate (SAA-C02) — Question 709

A company needs to move data from an Amazon EC2 instance to an Amazon S3 bucket. The company must ensure that no API calls and no data are routed through public internet routes. Only the EC2 instance can have access to upload data to the S3 bucket.
Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

A gateway VPC endpoint provides a reliable and private connection to Amazon S3 without traversing the public internet or requiring public IP addresses. By attaching an S3 bucket policy (resource policy) that restricts write access to the specific IAM role associated with the EC2 instance, you ensure that only the authorized instance can upload data. Options C and D are incorrect because Amazon S3 is a public service without static, private IP addresses that can be manually resolved and routed in this manner.