0 votes
in AWS by
A developer has deployed an application on an Amazon EC2 instance in a private subnet within a VPC. The subnet does not have Internet connectivity. The developer would like to write application logs to an Amazon S3 bucket. What MUST be configured to enable connectivity?

A. An IAM role must be added to the instance that has permissions to write to the S3 bucket

B. A bucket policy needs to be added specifying the principles that are allowed to write data to the bucket

C. A VPN should be established to enable private connectivity to S3

D. A VPC endpoint should be provisioned for S3

1 Answer

0 votes
by
The correct answer is D. “A VPC endpoint should be provisioned for S3”.

Explanation:

Please note that the question specifically asks how to enable connectivity so this is not about permissions. When using a private subnet with no Internet connectivity there are only two options available for connecting to Amazon S3 (which remember, is a service with a public endpoint, it’s not in your VPC).

The first option is to enable Internet connectivity through either a NAT Gateway or a NAT Instance. However, there is no answer offering either of these as a solution. The other option is to enable a VPC endpoint for S3.

The specific type of VPC endpoint to S3 is a Gateway Endpoint. EC2 instances running in private subnets of a VPC can use the endpoint to enable controlled access to S3 buckets, objects, and API functions that are in the same region as the VPC. You can then use an S3 bucket policy to indicate which VPCs and which VPC Endpoints have access to your S3 buckets.

Related questions

0 votes
asked Apr 17 in AWS by DavidAnderson
0 votes
asked Apr 22 in AWS by DavidAnderson
...