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. Enable 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 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
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
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 config:
# 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
Alternatively, you can set it in your Boto3 client:
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 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 AI Object Storage, you must pass it manually in each command:
aws s3 ls --endpoint-url https://cwobject.com
Boto example
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.