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:
# 1. Set virtual-hosted style for the *default* profileaws 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 settingaws configure get default.s3.addressing_style # default profileaws configure get s3.addressing_style --profile myprofile
This Boto example shows where to modify the S3 config within the Boto config:
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:
# Set the endpoint URL for a named profileaws configure set endpoint_url "https://cwobject.com" --profile myprofile# Verify the endpoint URL for the named profileaws configure get endpoint_url --profile myprofile
Boto 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:
[default]region = US-EAST-04Aendpoint_url = https://cwobject.coms3 =addressing_style = virtual
Named profile:
[profile myprofile]region = US-EAST-04Aendpoint_url = https://cwobject.coms3 =addressing_style = virtual
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:
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:
import boto3from botocore.client import Configboto_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)