Create a Bucket

Prev Next

Once you have an instance of the S3 service client, you can call the create_bucket() method on the client instance to create a bucket.

Note

The LocationConstraint(string) parameter can be provided within the CreateBucketConfiguration (dict) parameter to specify a string representing a region where the bucket is created. If you don't specify a region, the region is set to 'vast-1'.

Example

In this example, we create a bucket called mybucket.

response = s3_client.create_bucket(
    Bucket='mybucket'
)