I’m creating a Lambda that iterates over all S3 buckets and has the line:
for bucket in s3.buckets.all():
When I try to test it I get:
“An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied”
I’m in a group that has the AmazonS3FullAccess policy:
“Statement”: [
{
“Effect”: “Allow”,
“Action”: “s3:",
“Resource”: "”
}
Why can I not even list the buckets?
Edit: after some Googling I created another policy with:
“Resource”: ["", "arn:aws:s3:::/*"]
and attached it to a group I’m in and I still get the same response. WTF Amazon?