Get your canonical user ID

Each Object Storage account has its own canonical user ID, that you use to identify your specific account or share resources between accounts. This ID consists of a long string of letters, dashes, and numbers, such as a0000000-000a-0000-0000-00d0ff0f0000.

📘

Each Akamai Cloud account has a single canonical ID within Object Storage, which means that all users and Object Storage API keys on an account share the same canonical ID.

Here, we show you several ways you can get the canonical user ID for a specific account

s3cmd

You can use the info command in S3cmd utility, replacing [bucket-label] with the label of the bucket.

s3cmd info s3://[bucket-label]
📘

You need to configure S3cmd to use the access key for the account that owns the bucket.

In the output, find an ACL that has the FULL_CONTROL permission and looks similar to this string:

s3://example-bucket/ (bucket):
Location:  default
Payer:     BucketOwner
Expiration Rule: none
Policy:    none
CORS:      none
ACL:       a0000000-000a-0000-0000-00d0ff0f0000: FULL_CONTROL

If you see none as the ACL, your instance of s3cmd may be configured for a different region than where the bucket is located. See the Additional configuration options of our s3cmd guide to learn how to manually edit the s3cmd configuration.

AWS CLI

Run this command, replacing [bucket-url] with the URL of the bucket. See Bucket URLs for instructions on formatting your bucket URL.

aws s3api list-buckets --query Owner.ID --output text --endpoint=[bucket-url]
📘

You need to configure AWS CLI to use the access key for the account that owns the bucket.

cURL

You may be able to retrieve the canonical ID by curling a bucket and retrieving it from the XML response. This only applies if:

  • The bucket has objects in it and it's already been set to public, with a command like s3cmd setacl s3://other-users-bucket --acl-public.
  • The bucket has not been set to serve static websites.

Run this command, replacing [bucket-url] with the URL of the bucket, for example: example-bucket.us-southeast-1.linodeobjects.com. See Bucket URLs for instructions on formatting your bucket URL.

curl [bucket-url]

In the output, the canonical ID is displayed in the <Owner><ID> fields. In the example output below, the ID is a0000000-000a-0000-0000-00d0ff0f0000.

...
<Owner>
    <ID>a0000000-000a-0000-0000-00d0ff0f0000</ID>
    <DisplayName>a0000000-000a-0000-0000-00d0ff0f0000</DisplayName>
</Owner>
...

Did this page help you?