> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set endpoints

> Set AI Object Storage endpoints with virtual-hosted style addressing

CoreWeave AI Object Storage requires virtual-hosted style URLs. Path-style addressing isn't supported, so you must configure your client accordingly. This guide explains how to set the virtual-hosted addressing style and a valid AI Object Storage endpoint URL in your S3 configuration.

In virtual-hosted style, the bucket name is part of the domain, such as `https://[BUCKET-NAME].cwobject.com`, instead of part of the path.
When you enable this, your S3 client prepends bucket names to the endpoint in the correct format for AI Object Storage: `https://[BUCKET-NAME].cwobject.com`.

Make sure your S3 client isn't using path-style addressing (for example, `https://cwobject.com/[BUCKET-NAME]/file`). This format is unsupported and causes errors.

<Info>
  **Use the CoreWeave fork of `s5cmd` with AI Object Storage**

  The upstream [`s5cmd`](https://github.com/peak/s5cmd) uses path-style addressing with custom endpoint URLs. AI Object Storage doesn't support path-style addressing and requires virtual-hosted style URLs. Use the [CoreWeave fork of `s5cmd`](https://github.com/coreweave/s5cmd), which is compatible with AI Object Storage and can safely replace any existing `s5cmd` installation. For setup and usage, see [Migrate data to AI Object Storage](/products/storage/object-storage/migrate-data#migrate-data-with-s5cmd).
</Info>

## Configure CoreWeave credentials

We recommend using a separate profile for CoreWeave AI Object Storage to avoid conflicts with your other AWS profiles and S3-compatible services. If you don't set up this configuration, you might encounter errors when using AI Object Storage.

<Accordion title="Configure CoreWeave credentials">
  1. Create a new credentials file and profile in your CoreWeave configuration directory.

     ```bash title="Create a new credentials file and profile" theme={"system"}
     AWS_SHARED_CREDENTIALS_FILE=~/.coreweave/cw.credentials aws configure --profile cw
     ```

  2. When prompted, provide the following values:

     * **AWS Access Key ID**: The [Access Key](/products/storage/object-storage/auth-access/manage-access-keys/create-keys) ID of your CoreWeave AI Object Storage Access Key.
     * **AWS Secret Access Key**: The Secret Key of your CoreWeave AI Object Storage Access Key.
     * **Default region name** (Optional): To set a default region, see [CoreWeave Availability Zones](/products/storage/object-storage/buckets/manage-buckets#availability-zones).
     * **Default output format**: Use `json` for JSON output.

  3. Set the default endpoint URL to the appropriate endpoint for your use case:

     * The primary endpoint, `https://cwobject.com`, for use outside a CoreWeave cluster.
     * The LOTA endpoint, `http://cwlota.com`, for use inside a CoreWeave cluster. The LOTA endpoint routes to the LOTA path for best performance.

     ```bash title="Set the primary endpoint for local development" theme={"system"}
     AWS_CONFIG_FILE=~/.coreweave/cw.config aws configure set endpoint_url https://cwobject.com --profile cw
     ```

  4. Set the S3 `addressing_style` to `virtual`:

     ```bash title="Set virtual addressing style" theme={"system"}
     AWS_CONFIG_FILE=~/.coreweave/cw.config aws configure set s3.addressing_style virtual --profile cw
     ```

  If you set `endpoint_url` and `s3.addressing_style` directly in your code (for example, in a Boto3 `Config` object), you can skip steps 3 and 4. The profile only needs the access key, secret key, and region.
</Accordion>

## Set virtual addressing style

With the AWS CLI, set the virtual addressing style for your CoreWeave profile, then verify the setting:

```bash title="Configure the virtual addressing style" theme={"system"}
aws configure set s3.addressing_style virtual --profile cw
```

```bash title="Verify the setting" theme={"system"}
aws configure get s3.addressing_style --profile cw
```

Boto3 shares this AWS CLI configuration, unless overridden by a `Config` object or the environment. This Boto3 example shows where to set the S3 addressing style within the `Config` object:

```python theme={"system"}
boto_config = Config(
    region_name = 'US-EAST-04A',
    s3={'addressing_style':'virtual'}
)
```

## Set endpoint URL

Make sure you use valid AI Object Storage endpoint URLs:

* Use the primary endpoint, `https://cwobject.com`, when running outside of a CoreWeave cluster.
* Use the LOTA endpoint, `http://cwlota.com`, when running inside a CoreWeave cluster. The LOTA endpoint routes to the LOTA path for better performance.

Set the default endpoint URL in your AWS config, and verify the setting:

```bash title="Set the endpoint URL" theme={"system"}
aws configure set endpoint_url "https://cwobject.com" --profile cw
```

```bash title="Verify the endpoint URL" theme={"system"}
aws configure get endpoint_url --profile cw
```

Alternatively, you can set it in your Boto3 client. Set your credentials as environment variables, then pass them to the client:

```bash theme={"system"}
export ACCESS_KEY_ID="[ACCESS-KEY-ID]"
export SECRET_ACCESS_KEY="[SECRET-ACCESS-KEY]"
```

```python theme={"system"}
import os
import boto3
from botocore.client import Config

boto_config = Config(
    region_name='US-EAST-04A',
    s3={'addressing_style': 'virtual'}
)

s3_client = boto3.client(
    's3',
    endpoint_url='https://cwobject.com',
    aws_access_key_id=os.environ['ACCESS_KEY_ID'],
    aws_secret_access_key=os.environ['SECRET_ACCESS_KEY'],
    config=boto_config
)
```

## Full configuration examples

These configuration examples show how to set both the virtual-hosted addressing style and the AI Object Storage endpoint URL. Use one of these availability zones (AZs) for your region:

<Accordion title="Availability Zones that support AI Object Storage">
  <Tabs>
    <Tab title="US-CENTRAL">
      * `US-CENTRAL-05A`
      * `US-CENTRAL-06A`
      * `US-CENTRAL-07A`
      * `US-CENTRAL-08A`
      * `US-CENTRAL-08B`
    </Tab>

    <Tab title="US-EAST">
      * `US-EAST-01A`
      * `US-EAST-02A`
      * `US-EAST-03A`
      * `US-EAST-04A`
      * `US-EAST-04B`
      * `US-EAST-06A`
      * `US-EAST-08A`
      * `US-EAST-13A`
      * `US-EAST-14A`
    </Tab>

    <Tab title="US-WEST">
      * `RNO2A`
      * `US-WEST-01A`
      * `US-WEST-04A`
      * `US-WEST-09B`
      * `US-WEST-10A`
    </Tab>

    <Tab title="CA-EAST">
      * `CA-EAST-01A`
    </Tab>

    <Tab title="EU-NORTH">
      * `EU-NORTH-05A`
    </Tab>

    <Tab title="EU-SOUTH">
      * `EU-SOUTH-03B`
      * `EU-SOUTH-04A`
    </Tab>
  </Tabs>

  Learn more about [Regions and Availability Zones](/platform/regions/about-regions-and-azs).
</Accordion>

<Tabs>
  <Tab title="AWS CLI">
    If you use an S3 client that reads the AWS config file (`~/.aws/config`), such as the AWS CLI, the S3 SDKs, or s3cmd, you can add the configuration directly to your CoreWeave profile:

    Named profile:

    ```ini theme={"system"}
    [profile cw]
    region = US-EAST-04A
    endpoint_url = https://cwobject.com
    s3 =
       addressing_style = virtual
    ```
  </Tab>

  <Tab title="Boto3">
    Boto3 uses the same configuration files that you set with the AWS CLI. You can override your AWS CLI configuration by setting the addressing style in the `Config` object, and the `endpoint_url` in the client:

    Set your credentials as environment variables, then pass them to the client. Replace `[BUCKET-NAME]`, `[LOCAL-FILE-PATH]`, and `[OBJECT-KEY]` with your values.

    ```bash theme={"system"}
    export ACCESS_KEY_ID="[ACCESS-KEY-ID]"
    export SECRET_ACCESS_KEY="[SECRET-ACCESS-KEY]"
    ```

    ```python theme={"system"}
    import os
    import boto3
    from botocore.client import Config

    boto_config = Config(
        region_name='US-EAST-04A',
        s3={'addressing_style': 'virtual'}
    )

    s3_client = boto3.client(
        's3',
        endpoint_url='https://cwobject.com',
        aws_access_key_id=os.environ['ACCESS_KEY_ID'],
        aws_secret_access_key=os.environ['SECRET_ACCESS_KEY'],
        config=boto_config
    )

    s3_client.upload_file('[LOCAL-FILE-PATH]', '[BUCKET-NAME]', '[OBJECT-KEY]')
    ```

    See [Boto3 Configuration](https://docs.aws.amazon.com/boto3/latest/guide/configuration.html) for details.
  </Tab>

  <Tab title="Multi-Storage Client">
    [Multi-Storage Client](https://github.com/NVIDIA/multi-storage-client) (MSC) wraps Boto3 with connection pool scaling, automatic multipart tuning, and a profile-based configuration system.

    The `s3` pass-through option requires MSC version 0.43.0 or later. Configure MSC with a YAML file or a Python dictionary. The `s3` option under `storage_provider.options` passes settings directly to `botocore.config.Config`, including `addressing_style`:

    ```yaml theme={"system"}
    profiles:
      cw:
        storage_provider:
          type: s3
          options:
            base_path: [BUCKET-NAME]
            endpoint_url: https://cwobject.com
            region_name: [AVAILABILITY-ZONE]
            multipart_threshold: 52428800  # 50 MB
            multipart_chunksize: 52428800  # 50 MB
            s3:
              addressing_style: virtual
        credentials_provider:
          type: S3Credentials
          options:
            access_key: ${AWS-ACCESS-KEY-ID}
            secret_key: ${AWS-SECRET-ACCESS-KEY}
    ```

    When running inside a CoreWeave cluster, set `endpoint_url` to `http://cwlota.com` to use the [LOTA](/products/storage/object-storage/improving-performance/about-lota) cache.

    See the [Multi-Storage Client documentation](https://nvidia.github.io/multi-storage-client/) for installation, Python dictionary configuration, and the full reference.
  </Tab>

  <Tab title="s3cmd">
    ```ini title="~/.s3cfg file" theme={"system"}
    # ~/.s3cfg
    host_base = cwlota.com
    host_bucket = %(bucket)s.cwlota.com
    use_https = False
    ```
  </Tab>
</Tabs>
