Available in Classic and VPC
Create a bucket.
Syntax
The mb syntax is as follows:
aws s3 mb \
<s3-uri> \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running mb.
Required options
The following options are required for mb.
| Options | Type | Required | Description |
|---|---|---|---|
<s3-uri> |
String | Required | Bucket's S3 URI
|
Common options
For information about the options common to all aws subcommands, see Ncloud Storage options.
Examples
If the bucket creation request is successful, the name of the created bucket is returned.
Command
The command example is as follows:
aws s3 mb s3://my-temp-bucket \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
make_bucket: my-temp-bucket
If you already own a bucket with the same name, the following error message will appear.
make_bucket failed: s3://my-temp-bucket An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.