create-bucket

Prev Next

Available in Classic and VPC

Create a bucket in Object Storage to store objects.

Syntax

The create-bucket syntax is as follows:

aws s3api create-bucket \
    --bucket <bucket> \
    [--create-bucket-configuration <create-bucket-configuration>] \
    [--object-lock-enabled-for-bucket | --no-object-lock-enabled-for-bucket] \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running create-bucket.

Required options

The following options are required for create-bucket.

Options Type Required Description
--bucket String Required Bucket name

Optional options

These are the optional options for create-bucket. Options that are not specified will use their default values.

Options Type Required Description
--create-bucket-configuration String Optional Bucket configuration information
--object-lock-enabled-for-bucket Boolean Optional Enables object lock when creating the bucket.
  • When enabled, versioning is also enabled.
--no-object-lock-enabled-for-bucket Boolean Optional Disables object lock when creating the bucket.

Common options

For information about the options common to all aws subcommands, see Object Storage options.

Examples

If the bucket creation request is successful, the bucket is created, and no result is displayed.

Command

The command example is as follows:

aws s3api create-bucket --bucket my-temp-bucket \
    --endpoint-url=https://kr.object.ncloudstorage.com