Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Action: The action s3:ListObjects does not exist

Invalid Action: The action s3:ListObjects does not exist. Did you mean s3:ListBucket? The API called ListObjects authorizes against the IAM action s3:ListBucket.

Getting error for policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "S3fileAccess",
            "Effect": "Deny",
            "Action": [
                "s3:PutObject",
                "s3:ListObjects",
                "s3:GetObject",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::files-*",
                "arn:aws:s3:::log-files-*"
            ]
        }
    ]
}
like image 999
Saurabh Raoot Avatar asked Jan 23 '26 05:01

Saurabh Raoot


1 Answers

That's correct, ListBucket "Grants permission to list some or all of the objects in an Amazon S3 bucket (up to 1000)". There is a different permission to list the buckets (ListAllMyBuckets). These names are a little odd, and I suspect it's a legacy issue, given that S3 was the first generally available service.

You can find all the permissions here: Actions, resources, and condition keys for AWS services

like image 168
Jason Wadsworth Avatar answered Jan 25 '26 20:01

Jason Wadsworth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!