A company has multiple Amazon VPC endpoints in the same VPC. A developer needs to configure an Amazon S3 bucket policy so users can access an S3 bucket only by using these VPC endpoints.
Which solution will meet these requirements?
A.
Create multiple S3 bucket polices by using each VPC endpoint ID that have the aws:SourceVpce value in the StringNotEquals condition.
B.
Create a single S3 bucket policy that has the aws:SourceVpc value and in the StringNotEquals condition to use VPC ID.
C.
Create a single S3 bucket policy that has the aws:SourceVpce value and in the StringNotEquals condition to use vpce*.
D.
Create a single S3 bucket policy that has multiple aws:sourceVpce value in the StringNotEquals condition. Repeat for all the VPC endpoint IDs.
C works as well but It is a broad solution I think it's better practice to use D and specify the exact endpoints that the user can access from.
"aws:sourceVpce": ["vpce-id1", "vpce-id2", "..."]
D, based on the following documentation:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies-vpc-endpoint.html#example-bucket-policies-restrict-accesss-vpc-endpoint
This option is the closest to being correct, but it should use StringEquals instead of StringNotEquals. The correct approach is to use a single S3 bucket policy with a condition that includes aws:SourceVpce with StringEquals for the specific VPC endpoint IDs. This will ensure that access is allowed only from those specified endpoints.
The correct answer is (C).
Solution (C) is the simplest and will meet the company's requirements. It creates a single S3 bucket policy that has the value aws:SourceVpce and the StringNotEquals condition to use vpce*. This will only allow users who are using a VPC endpoint in the same VPC to access the S3 bucket.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
CrescentShared
Highly Voted 1 year, 5 months agoshake76
1 year, 4 months agovipyodha
1 year, 1 month agoexamtopics111
9 months, 1 week agodilleman
Highly Voted 1 year, 6 months agoalbert_kuo
Most Recent 7 months, 1 week ago65703c1
11 months, 2 weeks agoKarBiswa
1 year, 2 months agojoshnort
1 year, 3 months agoCrescentShared
1 year, 3 months agovipyodha
1 year, 1 month agoSerialiDr
1 year, 3 months agorrshah83
1 year, 4 months agoCertified101
1 year, 4 months agoPrakashM14
1 year, 6 months agoekutas
1 year, 6 months agoekutas
1 year, 6 months agoDigo30sp
1 year, 6 months ago