# Creating a Bucket

To upload your data to Tigris, you must first create a bucket. When you create a bucket, you must choose a bucket name. After you create a bucket, you cannot change the bucket name. Buckets are global, and Tigris automatically stores the data close to your users. If your users move to a different region, the data moves with them.

The user that creates the bucket owns it. You can upload any number of objects to a bucket.

Buckets and the objects in them are private and can be accessed only via access keys that you explicitly grant access permissions to.

## Bucket location[​](#bucket-location "Direct link to Bucket location")

When you create a bucket, you can choose the location type for the bucket. The location type controls where your data is stored and how it is replicated across regions. For more information on location types, please see the bucket locations documentation: [Bucket Locations](/docs/buckets/locations/.md).

The default location type is global. To select a different location type with the S3 API, see [Creating a bucket in a specific location](#creating-a-bucket-in-a-specific-location).

## Bucket tier[​](#bucket-tier "Direct link to Bucket tier")

When you create a bucket, you can set the default object tier for all objects uploaded to it. The default tier can be one of the following:

* Standard
* Infrequent Access
* Archive
* Archive instant retrieval

The default tier can be overridden at the object level. You can also change the bucket's default tier after creation from [Bucket Settings](/docs/buckets/settings/.md#storage-tier); the change applies only to new objects. For more information, see the [Storage Tiers](/docs/objects/tiers/.md) guide.

## Creating a bucket using the Dashboard[​](#creating-a-bucket-using-the-dashboard "Direct link to Creating a bucket using the Dashboard")

To create a bucket using the Tigris Dashboard, follow these steps:

1. Go to [storage.new](https://storage.new/).
2. Enter a unique bucket name. ([Rules](/docs/buckets/bucket-rules/.md))
3. Choose the bucket location type.
4. Choose the default tier for the bucket.
5. Click **Create Bucket**.

![Create Tigris Bucket](/docs/assets/images/create-bucket-ab314ec5819cc37db3b4a6144b1cfe3a.png)

## Creating a bucket using the AWS CLI[​](#creating-a-bucket-using-the-aws-cli "Direct link to Creating a bucket using the AWS CLI")

Assuming you have the AWS CLI configured as shown in the [AWS CLI guide](/docs/sdks/s3/aws-cli/.md), you can create a bucket as follows:

```
aws s3api --endpoint-url https://t3.storage.dev create-bucket --bucket foo-bucket
```

```
$ aws s3api --endpoint-url https://t3.storage.dev create-bucket --bucket foo-bucket

{

    "Location": "/foo-bucket"

}
```

## Creating a bucket in a specific location[​](#creating-a-bucket-in-a-specific-location "Direct link to Creating a bucket in a specific location")

To select a location type, set `LocationConstraint` in the create bucket request. The value selects the location type:

| Location type | `LocationConstraint` value         | Example   |
| ------------- | ---------------------------------- | --------- |
| Global        | Omit the value, or use `auto`      | `auto`    |
| Single-region | One region code                    | `iad`     |
| Dual-region   | Two region codes, separated by `,` | `iad,sjc` |
| Multi-region  | One geography name: `usa` or `eur` | `usa`     |

The region codes are in the [Regions Reference](/docs/concepts/regions/.md#available-regions).

To create a single-region bucket in Ashburn, Virginia:

```
aws s3api --endpoint-url https://t3.storage.dev create-bucket \

  --bucket foo-bucket \

  --create-bucket-configuration '{"LocationConstraint":"iad"}'
```

For a different location type, replace the value with `iad,sjc` or `usa`. Use the JSON form shown above: the shorthand form of `--create-bucket-configuration` splits the value on each comma.

Write the value in lower case, with no space after a comma, and do not repeat a region. Tigris rejects any other value with HTTP 400 `InvalidArgument`.

info

Some S3 clients put their configured region into `LocationConstraint` automatically. Set the client region to `auto` so that it does not conflict with the bucket location. See [Regions](/docs/concepts/regions/.md).

If your SDK cannot set `LocationConstraint`, send the same value in the `X-Tigris-Regions` header. The header takes precedence over `LocationConstraint`.

## Creating a bucket using flyctl[​](#creating-a-bucket-using-flyctl "Direct link to Creating a bucket using flyctl")

To create a bucket for one of your Fly apps, run the following command in the directory where your Fly app is located:

```
fly storage create
```

This will create a bucket and set the required environment variables for you.

```
$ fly storage create

? Choose a name, use the default, or leave blank to generate one: demo-bucket

Your  project (demo-bucket) is ready. See details and next steps with:



Setting the following secrets on ot-demo:

AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY

BUCKET_NAME

AWS_ENDPOINT_URL_S3



Secrets are staged for the first deployment
```

If you want to create a bucket that is not associated with a Fly app, you can run the same command outside of a Fly app directory.

```
$ fly storage create

? Select Organization: Ovais Tariq (personal)

? Choose a name, use the default, or leave blank to generate one:

Your  project (polished-thunder-5646) is ready. See details and next steps with:



Set one or more of the following secrets on your target app.

AWS_ENDPOINT_URL_S3: https://t3.storage.dev

AWS_ACCESS_KEY_ID: xxxxxxxxxxxxxxxxxxxx

AWS_SECRET_ACCESS_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

BUCKET_NAME: polished-thunder-5646
```
