# Buckets

In <code class="expression">space.vars.ionos\_cloud\_object\_storage</code>, a bucket is the primary container for data. Think of it like a directory in a file system where you can store files known as objects. Each object is stored in a bucket and is identified by a unique key, allowing easy retrieval. You can store any number of objects in a bucket and can create up to 500 buckets in a user account.

## Bucket region

A region corresponds to a geographical location where the data inside the buckets will be stored. Different regions have different [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/ionos-object-storage/endpoints), which are URLs to access the Object Storage.

<code class="expression">space.vars.ionos\_cloud\_object\_storage</code> is available in the following regions:

* Berlin, Germany in `eu-central-2` and `eu-central-3`
* Frankfurt, Germany in `de` and `eu-central-4`
* Logroño, Spain in `eu-south-2`
* Lenexa, USA in `us-central-1`

Choosing the right bucket region is crucial for optimizing your cloud storage. Consider the following:

* **Proximity:** Select a region that is close to your application or user base to reduce latency and costs.
* **Redundancy:** For backups, consider a region geographically separate from your primary location to ensure data safety during local outages or disasters.

For information on supported regions based on the [<mark style="color:blue;">Bucket Types</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/ionos-object-storage/concepts/bucket-types), see [<mark style="color:blue;">Service availability</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/overview#service-availability).

## Naming conventions

When naming buckets and folders, the name must adhere to the following rules:

* Be unique throughout the entire [<mark style="color:blue;">Object Storage</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/ionos-object-storage/overview).
* Consists of 3 to 63 characters.
* Starts with a letter or a number.
* Consists of lowercase letters (a-z) and numbers (0-9).
* The use of hyphens (-), periods (.), and underscores (\_) is conditional.

**Note:** The bucket name **must not**:

* End with a period, hyphen, or underscore.
* Include multiple periods in a row (...).
* Contain hyphens next to periods.
* Have the format of an IPv4 address (Example: `192.168.1.4`).
* Contain underscores if the bucket is to be used for auto-tiering later.

Following are a few examples of correct bucket naming:

* `data-storage-2023`
* `userphotos123`
* `backup-archive`
* `1234`

Following are a few examples of incorrect bucket naming:

| **Example**                                                                   | **Reason for Incorrectness**                     |
| ----------------------------------------------------------------------------- | ------------------------------------------------ |
| `Data-Storage`                                                                | Contains uppercase letters.                      |
| `user.photos`                                                                 | Contains periods which might cause SSL issues.   |
| `a2`                                                                          | Too short, less than 3 characters.               |
| `a-very-long-bucket-name-that-exceeds-sixty-three-characters-in-total-length` | Exceeds the 63—character limit.                  |
| `bucket-`                                                                     | Ends with a hyphen.                              |
| `bucket_with_underscore`                                                      | Allowed but not a recommended naming convention. |
