Find basket owner S3

If there is a button with which I have read / write access from my AWS account, is there a way to get the owner CanonicalUser ID?

Reading the ACL policy seems impossible unless you own it: /.

+4
source share
2 answers

Use get-bucket-acl if you have permission to read the bucket. This will give a result like this

{ "Owner": { "DisplayName": "my-username", "ID": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd087d36c32" }, "Grants": [ { "Grantee": { "DisplayName": "my-username", "ID": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd087d36c32" }, "Permission": "FULL_CONTROL" } ] } 
+2
source

Have you tried the GET Bucket transaction? It is used to enumerate objects inside the bucket, and also returns a tag that, although it looks like the owner of the object, according to the documents, is the owner of the bucket:

Owner
Bucket Owner.
Type: String
Children: DisplayName, ID
Ancestors: ListBucketResult.Contents | Commonprefixes

0
source

All Articles