AWS S3 - Access Point
Amazon S3 access points simplify data access for any AWS service or customer application that stores data in S3. Access points are named network endpoints that are attached to buckets that you can use to perform S3 object operations, such as
GetObject
and PutObject
. Each access point has distinct permissions and network controls that S3 applies for any request that is made through that access point. Each access point enforces a customized access point policy that works in conjunction with the bucket policy that is attached to the underlying bucket. This is what we are trying to implement.
The user will have an inline policy to perform GET/PUT object operation on the ACCESS POINT.
To create an access point.
I am creating the access point origin as "VPC", which means it's accessible only from VPC. So, for testing, I will be performing all actions from the EC2 instance.
Next, updated the access point policy which allows access only for the user I created "userserver1" and mentioned the actions (GET/PUT) and the resource name which is ACCESS POINT ARN.
The access point ARN is arn:aws:s3:us-east-1:538083825364:accesspoint/demoap-vpc -> But you need to add the keyword "object" to it.
Let's try to upload a file to the bucket via the access point from the EC2 instance.
The bucket policy should allow actions only from the DataAccessPointAccount is matching.
Let’s refine access to individual folders.
I created a folder called “ap” under the same bucket. And I am going to restrict the user only to that bucket.
All I must do is update the access point policy and the IAM role policy.
IAM policy:
Access Point Policy:
Comments
Post a Comment