# Create a Bucket

When creating a bucket, you must choose the two essential settings:

* The bucket region.
* To whether or not to enable the Object Lock for the bucket.

The Object Storage bucket can be created through one of the following methods:

* [<mark style="color:blue;">Web console</mark>](#web-console)
* [<mark style="color:blue;">IONOS S3 Object Storage API</mark>](#ionos-s3-object-storage-api)
* [<mark style="color:blue;">Command-line tool</mark>](#command-line-tool)

## Web console

The easiest way to create a bucket is by using the S3 Web Console. You must create a bucket before you can start uploading objects to the Object Storage.

To create an Object Storage bucket, follow these steps:

1\. In the **DCD**, go to **Menu** > **Storage** > **IONOS S3 Object Storage**.

2\. In the **Buckets** tab, choose the **Bucket region** which determines the geographical location where the data inside the buckets will be stored. For more information on choosing the right bucket region, see [<mark style="color:blue;">Bucket region</mark>](/cloud/~/revisions/bM7yG7XCmGE9IxWqMpBu/managed-services/s3-object-storage/concepts/buckets.md#bucket-region).

3\. Enter a unique name for the **Bucket name** that adheres to the [<mark style="color:blue;">naming conventions</mark>](/cloud/~/revisions/bM7yG7XCmGE9IxWqMpBu/managed-services/s3-object-storage/concepts/buckets.md#naming-conventions) for a bucket.

{% hint style="warning" %}
**Note:** A bucket will not be created if a bucket with the same name already exists in the IONOS S3 Object Storage.
{% endhint %}

4\. Click **Create**.

![Create a bucket](/files/J8HvC0VKGzYMeFOYO98Z)

{% hint style="success" %}
**Result:** A bucket is created in the selected S3 region.
{% endhint %}

## IONOS S3 Object Storage API

Using the [<mark style="color:blue;">Create Bucket API</mark>](https://api.ionos.com/docs/s3/v2/#tag/Basic-Operations/operation/CreateBucket), you can create a bucket with or without the object lock.

## Command-line tool

For details on configuring the AWS CLI tool, see [<mark style="color:blue;">AWS CLI</mark>](/cloud/~/revisions/bM7yG7XCmGE9IxWqMpBu/managed-services/s3-object-storage/s3-tools/awscli.md).

### To create a bucket without an object lock, follow these commands:

* In the `de` region (Franfurt, Germany)

```
aws s3 mb s3://my-bucket --region de --endpoint-url https://s3-eu-central-1.ionoscloud.com
```

* In the `eu-central-2` region (Berlin, Germany)

```
aws s3 mb s3://my-bucket --object-lock-enabled-for-bucket --region eu-central-2 --endpoint-url https://s3-eu-central-2.ionoscloud.com
```

* In the `eu-south-2` region (Logrono, Spain)

```
aws s3 mb s3://my-bucket --region eu-south-2 --endpoint-url https://s3-eu-south-2.ionoscloud.com
```

### To create a bucket with an object lock, follow these commands:

* In the `de` region (Franfurt, Germany)

```
aws s3 mb s3://my-bucket --object-lock-enabled-for-bucket --region de --endpoint-url https://s3-eu-central-1.ionoscloud.com
```

* In the `eu-central-2` region (Berlin, Germany)

```
aws s3 mb s3://my-bucket --object-lock-enabled-for-bucket --region eu-central-2 --endpoint-url https://s3-eu-central-2.ionoscloud.com
```

* In the `eu-south-2` region (Logrono, Spain)

```
aws s3 mb s3://my-bucket --object-lock-enabled-for-bucket --region eu-south-2 --endpoint-url https://s3-eu-south-2.ionoscloud.com
```

{% hint style="info" %}
**Note:** Creating a bucket with object lock enabled is currently possible only using command-line tools or [<mark style="color:blue;">Create Bucket API</mark>](https://api.ionos.com/docs/s3/v2/#tag/Basic-Operations/operation/CreateBucket).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/bM7yG7XCmGE9IxWqMpBu/managed-services/s3-object-storage/get-started/create-bucket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
