Odd privilege requirements for AWS
Both of the following methods fail (403 result from server)
string url = await storage.GetPresignedUrlAsync("mycontainer/someid", null, 86000, Amazon.S3.HttpVerb.GET);
string content = await storage.ReadTextAsync("mycontainer/someid");
when using the following user policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::test" ] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::test/*" ] } ] }
If the bucket policy is changed from "s3:ListBucket" to ""s3:*", the program works.
Why are additional bucket permissions needed for these requests, and precisely what additional bucket permissions are required?
I´m having a similar problem. Using S3 sdk, a query like this :
var o = await GetClient().ListObjectsV2Async(new ListObjectsV2Request
{
BucketName = bucketName,
Prefix = "nf/"
});
it works.
but, with the same config, if I send storage.ListAsync(...
I´m getting an access denied error.
Any clue?