GetAwsS3BucketOwner

nicolaw 20th February 2019 at 11:59am
AWS awscli

aws s3api get-bucket-acl --bucket <BUCKET_NAME_HERE>

$ aws s3api get-bucket-acl --bucket my-super-secret-bucket-name
{
    "Owner": {
        "DisplayName": "aws.foo.bar",
        "ID": "acc31e02c97852f5ea1dcdb9a75f9f682093231c"
    },
    "Grants": [
        {
            "Grantee": {
                "DisplayName": "aws.foo.bar",
                "ID": "acc31e02c97852f5ea1dcdb9a75f9f682093231c",
                "Type": "CanonicalUser"
            },
            "Permission": "FULL_CONTROL"
        }
    ]
}