0 votes
in AWS by

Your organization has an existing VPC setup and has a requirement to route any traffic going from VPC to AWS S3 bucket through AWS internal network. So they have created a VPC endpoint for S3 and configured to allow traffic for S3 buckets. The application you are developing involves sending traffic to AWS S3 bucket from VPC for which you planned to use a similar approach. You have created a new route table, added route to VPC endpoint and associated route table with your new subnet. However, when you are trying to send a request from EC2 to S3 bucket using AWS CLI, the request is getting failed with 403 access denied errors. What could be causing the failure?

A. AWS S3 bucket is in a different region than your VPC.

B. EC2 security group outbound rules not allowing traffic to S3 prefix list.

C. VPC endpoint might have a restrictive policy and does not contain the new S3 bucket.

D. S3 bucket CORS configuration does not have EC2 instances as the origin.

1 Answer

0 votes
by

C. VPC endpoint might have a restrictive policy and does not contain the new S3 bucket.

Option A is not correct. The question states “403 access denied”. If the S3 bucket is in a different region than VPC, the request looks for a route with NAT Gateway or Internet Gateway. If it exists, the request goes through the internet to S3. If it does not exist, the request gets failed with connection refused or connection timed out. Not with an error “403 access denied”.
Option B is not correct. Same as above, when the security group does not allow traffic, the failure cause will be 403 access denied.
Option C is correct.

Related questions

0 votes
asked Sep 1, 2022 in AWS by sharadyadav1986
0 votes
asked Sep 1, 2022 in AWS by sharadyadav1986
...