0015-00000001

Updated at:

Problem description

The specified bucket name is invalid.

Causes

This error has two common causes:

  • The bucket name violates naming conventions. Bucket names must meet all of the following requirements:

    • Contain only lowercase letters, digits, and hyphens (-)

    • Start and end with a lowercase letter or digit

    • Be 3–63 characters in length

  • When using an OSS SDK, the endpoint includes a bucket name (incorrect usage). The endpoint must point to a region only, not to a specific bucket.

Examples

Invalid PutBucket request — the bucket name ABC contains uppercase letters, which violates naming conventions:

PUT / HTTP/1.1
Host: ABC.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2017 03:15:40 GMT
x-oss-acl: private
Authorization: OSS LTAI****************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration>
    <StorageClass>Standard</StorageClass>
    <DataRedundancyType>LRS</DataRedundancyType>
</CreateBucketConfiguration>

Invalid SDK endpoint — the endpoint includes a bucket name (your-bucket), which is not allowed:

$endpoint = "https://your-bucket.oss-cn-hangzhou.aliyuncs.com";
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);

Solutions

If the bucket name is invalid, rename it to comply with the naming conventions listed in Causes.

If the SDK endpoint includes a bucket name, remove the bucket name from the endpoint. The endpoint must point to the region only:

$endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);

References