This section helps you use S3cmd to create an OBS bucket.
You have installed and configured S3cmd.
- Open the command line tool.
- Run the following command to create an OBS bucket:
s3cmd mb s3://my-bucket
my-bucket is the name of the bucket that you want to create. The name of each bucket is globally unique on OBS and complies with the following rules:
- Contains 3 to 63 characters, including lowercase letters, digits, hyphens (-), and periods (.), and starts with a digit or letter
- Cannot be an IP address
- Cannot start or end with a hyphen (-) or period (.)
- Cannot contain two consecutive periods (.), for example, my..bucket
- Cannot contain periods (.) and hyphens (-) adjacent to each other, for example, my-.bucket or my.-bucket
If the following command output is displayed, it indicates that an OBS bucket is successfully created.
Bucket 's3://my-bucket/' created
- (Optional) Run the following command to obtain the bucket list and check whether the name of the newly created bucket is in the bucket list: