# Create a Bucket

When creating a bucket, you must carefully consider the following settings:

* The [<mark style="color:blue;">Bucket Types</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/concepts/bucket-types).
* Supported [<mark style="color:blue;">service availability</mark>](https://docs.ionos.com/cloud/backup-and-storage/overview#service-availability) regions.
* To enable [<mark style="color:blue;">Object Lock</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/settings/object-lock) or not for the bucket.

## DCD

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

You can create either a contract-owned bucket or a user-owned bucket but the shift towards a contract-owned bucket model will be the primary focus for future Object Storage updates.

{% tabs %}
{% tab title="Contract-owned Buckets" %}
To create a contract-owned bucket, follow these steps:

{% hint style="info" %}
**Prerequisites:**

* Make sure you have the relevant permission to create the Object Storage. Only a contract owner or an administrator can create contract-owned buckets.
* You must have at least one active access key; otherwise, [<mark style="color:blue;">Generate a Key</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/get-started/generate-key) or [<mark style="color:blue;">activate</mark>](https://docs.ionos.com/cloud/backup-and-storage/how-tos/manage-keys#activate-or-deactivate-a-key) an existing access key.
  {% endhint %}

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

2\. In the **Buckets** tab, click **Create bucket**.

3\. Choose the **Bucket region**, which determines the geographical location of data storage inside the buckets.

You can create contract-owned buckets in these regions: `eu-central-4`,`eu-central-3`, and in the `us-central-1`. For more information, see [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/endpoints).

4\. Enter a unique name for the **Bucket name** that adheres to the [<mark style="color:blue;">naming conventions</mark>](https://docs.ionos.com/cloud/backup-and-storage/concepts/buckets#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 <code class="expression">space.vars.ionos\_cloud\_object\_storage</code>.
{% endhint %}

5\. *(Optional)* Choose whether you want to enable the Object Lock for the bucket. If yes, then select the **Enable Object Lock** checkbox.

6\. If the Object Lock is enabled, select the mode of Object Lock to apply on the objects uploaded to the bucket. Choose from the **Governance mode** or **Compliance mode** and input the **Retention period** in days or years. For more information, see [<mark style="color:blue;">Modes</mark>](https://docs.ionos.com/cloud/backup-and-storage/settings/object-lock#modes).

![Object lock](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-c1ae486b68d78abfb3da10cc63591eb573e06c5e%2Fs3-object-lock.png?alt=media)

{% hint style="info" %}
**Note:** When enabling Object Lock, [<mark style="color:blue;">Versioning</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/settings/versioning) is enabled for the bucket by default.
{% endhint %}

7\. Click **Create bucket**.

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

{% tab title="User-owned Buckets" %}
To create a user-owned bucket, follow these steps:

{% hint style="info" %}
**Prerequisite:** You must have at least one active access key; otherwise, [<mark style="color:blue;">Generate a Key</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/get-started/generate-key) or [<mark style="color:blue;">activate</mark>](https://docs.ionos.com/cloud/backup-and-storage/how-tos/manage-keys#activate-or-deactivate-a-key) an existing access key.
{% endhint %}

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

2\. In the **Buckets** tab, click **Create a bucket**.

3\. Choose the **Bucket region**, which determines the geographical location of data storage inside the buckets. You can create user-owned buckets in these regions: `de`, `eu-central-2`, and `eu-south-2`. For more information, see [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/endpoints).

4\. Enter a unique name for the **Bucket name** that adheres to the [<mark style="color:blue;">naming conventions</mark>](https://docs.ionos.com/cloud/backup-and-storage/concepts/buckets#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 <code class="expression">space.vars.ionos\_cloud\_object\_storage</code>.
{% endhint %}

5\. *(Optional)* Choose whether you want to enable the Object Lock for the bucket. If yes, then select the **Enable Object Lock** checkbox.

6\. If the Object Lock is enabled, select the mode of Object Lock to apply on the objects uploaded to the bucket. Choose from the **Governance mode** or **Compliance mode** and input the **Retention period** in days or years. For more information, see [<mark style="color:blue;">Modes</mark>](https://docs.ionos.com/cloud/backup-and-storage/settings/object-lock#modes).

![Object lock](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-c1ae486b68d78abfb3da10cc63591eb573e06c5e%2Fs3-object-lock.png?alt=media)

{% hint style="info" %}
**Note:** When enabling Object Lock, [<mark style="color:blue;">Versioning</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/settings/versioning) is enabled for the bucket by default.
{% endhint %}

7\. Click **Create bucket**.

{% hint style="success" %}
**Result:** A user-owned bucket is created in the selected region.
{% endhint %}
{% endtab %}
{% endtabs %}

## API

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

## CLI

For details on configuring the AWS CLI tool, see [<mark style="color:blue;">AWS CLI</mark>](https://docs.ionos.com/cloud/backup-and-storage/ionos-object-storage/s3-tools/awscli).

{% tabs %}
{% tab title="Contract-owned Buckets" %}

#### To create a bucket without an Object Lock

**In the `eu-central-4` region (Frankfurt, Germany):**

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

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

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

**In the `us-central-1` region (Lenexa, USA):**

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

#### To create a bucket with an Object Lock:

**In the `eu-central-4` region (Frankfurt, Germany):**

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

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

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

**In the `us-central-1` region (Lenexa, USA):**

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

{% endtab %}

{% tab title="User-owned Buckets" %}

#### To create a bucket without an Object Lock

* **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 --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

* **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
```

{% endtab %}
{% endtabs %}


---

# 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/backup-and-storage/ionos-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.
