Updated on 2024-11-26 GMT+08:00

Creating a Bucket

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to create a bucket. A bucket is a container that stores objects in OBS. Before you can store data in OBS, you must create a bucket.

Prerequisites

To create a bucket, make sure you have a registered account, sufficient account balance, access keys (AK and SK), and the endpoint information. For details, see Getting Started.

Constraints

  • After a bucket is created, its name and region cannot be changed. Make sure that the bucket name and region you set are appropriate.
  • An account (including all IAM users under the account) can create a maximum of 100 buckets. You can use the fine-grained access control of OBS to properly plan and use buckets. For example, you can create folders in a bucket based on object prefixes and use fine-grained permission control to isolate permissions between departments. There is no limit on the number and total size of objects in a bucket.
  • A bucket name is part of the access domain name and needs to be resolved. Therefore, the bucket name must conform to the DNS domain naming rules. When receiving a bucket creation request, OBS strictly checks the bucket name. A bucket name:
    • Must be unique across all accounts and regions. The name of a deleted bucket can be reused for another bucket or a parallel file system at least 30 minutes after the deletion.
    • Must be 3 to 63 characters long. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.
    • Cannot start or end with a period (.) or hyphen (-), and cannot contain two consecutive periods (..) or contain a period (.) and a hyphen (-) adjacent to each other.
    • Cannot be formatted as an IP address.

    If you use a bucket with periods (.) in its name to access OBS, the client will display a message indicating that the bucket is risky, for example, a red alarm may be displayed in the browser security prompt. This is because the SSL wildcard certificate matches only buckets without periods (.) in their names when HTTPS is used for OBS access. We recommend that you avoid using periods (.) in bucket names.

Ways to Create a Bucket

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to create a bucket.

Related Operations and FAQs