Finally, I started to work. Although I think there is a bug in the AWS management console, or at least it seems like that. The problem is that my policy was right all the way, but it behaved differently when I accessed it through the AWS management console and then software tools like CloudBErry. One thing I had to change was the ACL settings for objects and buckets. This would also have been done earlier if the AWS console worked correctly. Anyway, this is my policy:
{ "Statement": [ { "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "arn:aws:s3:::*", "Condition": {} }, { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:ListBucketVersions" ], "Resource": "arn:aws:s3:::pa-test", "Condition": { "StringLike": { "s3:prefix": "test/*" } } }, { "Effect": "Allow", "Action": "s3:*", "Resource": "arn:aws:s3:::pa-test/test/*", "Condition": {} } ] }
1) The problem is that I am accessing the management console for this IAM user through the AWS console. I get access when I click on my bucket, although when I log in through Cloudberry, I can see my folders. 2) I had to change the ACL settings for my bucket and objects (folders) for my bucket: Owner: Full control Authenticated users: Readonly
For my folders: Owner: Full control
Now the problem is that you cannot set ACl parameters for folders (objects) in the AWS console. You can set them for files (objects). For example, if you right-click on a folder (object) inside a bucket and then click on properties, it will not show you permission tabs. But if you right-click on a bucket or file (say test.html) and click on properties, it will show you the Permissions tab. I'm not sure anyone else noticed this problem. In any case, this is my script and it works now.
source share