Creates a bucket in Object Storage Service (OSS). A bucket is a container for objects — create one before uploading anything to OSS.
Prerequisites
Before you begin, make sure that you have:
The
oss:PutBucketpermission — see Attach a custom policy to a RAM user for details
Usage notes
Starting at 10:00 (UTC+8) on October 13, 2025, OSS enables Block Public Access by default for all new buckets created via the API, OSS SDKs, or ossutil. This applies to all regions and rolls out in phases — see [Official Announcement] Adjustment to Public Access Blocking Configurations for Newly Created Buckets for the schedule per region. When Block Public Access is enabled, public access control list (ACL) settings (public-read and public-read-write) and bucket policies that allow public access are blocked. To use public access, disable Block Public Access after creating the bucket.
Syntax
ossutil mb oss://<bucket-name> [flags]Example — create a private bucket:
ossutil mb oss://examplebucket --acl=privateOptions
| Option | Type | Required | Description |
|---|---|---|---|
--acl | string | Optional | The ACL of the bucket. Valid values: private, public-read, public-read-write. |
--redundancy-type | string | Optional | The redundancy type of the bucket. Valid values: LRS (locally redundant storage), ZRS (zone-redundant storage). See Redundancy types for details. |
--resource-group-id | string | Optional | The ID of the resource group to assign the bucket to. |
--storage-class | string | Optional | The storage class of the bucket. Valid values: Standard, IA (Infrequent Access), Archive, ColdArchive (Cold Archive), DeepColdArchive (Deep Cold Archive). |
For a full list of global flags, see Command-line options.
Redundancy types
| Value | Full name | Description |
|---|---|---|
LRS | Locally redundant storage | Stores multiple copies of your data across multiple storage devices in the same zone. Data remains accessible even if two storage devices fail simultaneously. |
ZRS | Zone-redundant storage | Stores multiple copies of your data across multiple zones in the same region. Data remains accessible even if a zone becomes unavailable. |
Examples
Example 1: Create a bucket with a private ACL
ossutil mb oss://examplebucket --acl=privateExample 2: Create a bucket with a private ACL and assign it to a resource group
ossutil mb oss://examplebucket --acl=private --resource-group-id rg-aek27tc****