I have following scenario, where I am trying to access S3 bucket contents using Access points, however I am getting AccessDenied
Error.
- Customer VPC with public subnet
- EC2 instance with public IP under this subnet
- Assigned IAM role to EC2 instance to have full access to S3
- Created S3 bucket
my-test-bucket
& access point 'my-test-ap' with default policy & VPC id provided to restrict access over internet ssh
to EC2 instance and run command -aws s3 ls --Bucket my-test-bucket
ORaws s3api list-objects --bucket -my-test-bucket
, lists all contents from bucket- Now running command like
aws s3api list-objects --bucket arn:aws:s3:us-east-1:my-account-id:accesspoint/my-test-ap
gives me `AccessDenied' message
Access Point Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:us-east-1:my-account-id:accesspoint/my-test-ap",
"Condition": {
"StringEquals": {
"s3:AccessPointNetworkOrigin": "VPC"
}
}
}
]
}
Note sure what is missing to get this working.
arn:aws:s3:us-east-1:my-account-id:accesspoint/my-test-ap/*
? – Marcin