Skip to main content

Configure Endpoints

Configure CAIOS endpoints with virtual-hosted style addressing

CoreWeave AI Object Storage (CAIOS) requires virtual-hosted style URLs. Path-style addressing is not supported, so you must configure your client accordingly. Enable the virtual-hosted addressing style and set a valid CAIOS endpoint URL in your S3 configuration.

In virtual-hosted style, the bucket name is part of the domain, like 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 CAIOS: https://[bucket-name].cwobject.com.

Make sure your S3 client is not using path-style addressing (e.g., https://cwobject.com/[bucket-name]/file). This format is unsupported and will result in errors.

Set virtual addressing style

Using the AWS CLI, you can set the virtual addressing style for either your default profile or a named profile, and then verify the setting:

Example
# 1. Set virtual-hosted style for the *default* profile
aws configure set default.s3.addressing_style virtual
# 2. Set it for a *named* profile (replace myprofile with yours)
aws configure set s3.addressing_style virtual --profile myprofile
# 3. Verify the setting
aws configure get default.s3.addressing_style # default profile
aws configure get s3.addressing_style --profile myprofile

This Boto example shows where to modify the S3 config within the Boto config:

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

Set endpoint URL

Make sure you use valid CAIOS endpoint URLs:

  • Use https://cwobject.com if using the primary endpoint.
  • Use http://cwlota.com if using the LOTA endpoint.

Set the default endpoint URL in your AWS or Boto config.

AWS CLI example:

Example
# Set the endpoint URL for a named profile
aws configure set endpoint_url "https://cwobject.com" --profile myprofile
# Verify the endpoint URL for the named profile
aws configure get endpoint_url --profile myprofile

Boto example:

Example
s3_client = boto3.client(
service_name='s3',
aws_access_key_id=access_key_id,
aws_secret_access_key=secret_key,
config=boto_config,
endpoint_url='https://cwobject.com'
)

Full configuration examples

These configuration examples show how to set both the virtual-hosted addressing style and the CAIOS endpoint URL.

AWS config example

If you are using an S3 client that uses the AWS config file (~/.aws/config), such the AWS CLI, the S3 SDKs, or s3cmd, you can add it directly to your AWS config, specifying it either in your default profile or a named profile:

Default profile:

Example
[default]
region = US-EAST-04A
endpoint_url = https://cwobject.com
s3 =
addressing_style = virtual

Named profile:

Example
[profile myprofile]
region = US-EAST-04A
endpoint_url = https://cwobject.com
s3 =
addressing_style = virtual
Pass the endpoint URL to AWS CLI

Most tools, including Boto3, the AWS SDKs, and s3cmd, use endpoint_url from your AWS config file.

However, the AWS CLI does not support reading endpoint_url from your AWS config. To use a custom endpoint like CAIOS, you must pass it manually in each command:

Example
aws s3 ls --endpoint-url https://cwobject.com

Boto example

If you're using Boto3, you can set the addressing style in the Config object, and the endpoint_url in the client:

Example
import boto3
from botocore.client import Config
boto_config = Config(
region_name = 'US-EAST-04A',
s3={'addressing_style':'virtual'}
)
s3_client = boto3.client(
service_name='s3',
aws_access_key_id=access_key_id,
aws_secret_access_key=secret_key,
config=boto_config,
endpoint_url='https://cwobject.com'
)
s3_client.upload_file(filepath, bucket, filename_on_bucket)