I\'m trying to list all the files in my S3 bucket. But constantly getting the error Access denied. I think I have the necessary permissions in my IAM
user :
Just found the answer! The Actions allowed in the policy are correct. The problem is with the Resource
. I was using this :
"Resource": [
"arn:aws:s3:::bucket/*"
]
But it looks like it does not give permission to the root of the bucket. No full access. So, to make it work, we have to remove /
like this :
"Resource": [
"arn:aws:s3:::bucket*"
]
Now it's working like a charm.