Configure Endpoints
Configure AI Object Storage endpoints with virtual-hosted style addressing
CoreWeave AI Object Storage requires virtual-hosted style URLs. Path-style addressing is not supported, so you must configure your client accordingly. This guide explains how to set the virtual-hosted addressing style and set a valid AI Object Storage 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 AI Object Storage: 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.
S5cmd is not compatible with AI Object Storage because it uses path-style addressing with a custom endpoint URL. AI Object Storage requires virtual-hosted style URLs with custom endpoints.
Any other third-party tool that does not support virtual-hosted style URLs with custom endpoints is also incompatible with AI Object Storage.
Set virtual addressing style
Using the AWS CLI, you can set the virtual addressing style for your CoreWeave profile, and then verify the setting:
$aws configure set s3.addressing_style virtual --profile cw# Verify the setting$aws configure get s3.addressing_style --profile cw
Boto3 shares this AWS CLI configuration, unless overridden by a Config object or the environment. 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 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 cache for best performance.
Set the default endpoint URL in your AWS config:
$aws configure set endpoint_url "https://cwobject.com" --profile cw# Verify the endpoint URL$aws configure get endpoint_url --profile cw
Alternatively, you can set it in your Boto3 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')
Full configuration examples
These configuration examples show how to set both the virtual-hosted addressing style and the AI Object Storage endpoint URL.
- AWS CLI
- Boto3
If you are using an S3 client that uses the AWS config file (~/.aws/config), such as the AWS CLI, the S3 SDKs, or s3cmd,
you can add it directly to your AWS config:
Named profile:
[profile cw]region = US-EAST-04Aendpoint_url = https://cwobject.coms3 =addressing_style = virtual
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:
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)
See Boto3 Configuration for details.