If you use Workload Identity Federation, use
awscli >= 2.33.2 or boto3 >= 1.42.5, which incorporate a required fix for CoreWeave APIs.Prerequisites
Before you begin, make sure you have the following:- An Object Storage Access Key and Secret Key, or a Workload Identity Federation setup.
- An organization access policy that grants the
s3:permissions you need. - The AWS CLI, Boto3, or both.
- Transport Layer Security (TLS) v1.3 support in your client and OpenSSL, which the primary endpoint,
https://cwobject.com, requires.
Static credentials
Static credentials are the simplest way to get started when you have an access key and secret key on hand. The same Access Key and Secret Key work with most S3-compatible clients. To set up the AWS shared configuration for Object Storage, create acw profile.
-
Create a new profile and name it
cw: -
When prompted for information, provide the following values:
-
Set the endpoint URL to the appropriate endpoint for your use case:
Set the primary endpoint URLSet the LOTA endpoint URL
-
Set the default addressing style to
virtual. This is required for Object Storage. -
To verify the connection, list your buckets. This requires the
s3:ListAllMyBucketspermission, which must specify"resources": ["*"]in your organization access policy.If your organization has no buckets, the command prints nothing.
--profile flag, run export AWS_PROFILE=cw, or add that line to your shell configuration file.
Use static credentials with Boto3
The Boto3 library shares the AWS CLI configuration, soboto3.client('s3') uses the cw profile when AWS_PROFILE=cw is set. To configure the client in code instead, set your credentials as environment variables. Replace ACCESS_KEY_ID_VALUE and SECRET_ACCESS_KEY_VALUE with your Access Key and Secret Key.
US-EAST-04A with the Availability Zone of your buckets. From workloads running in a CKS cluster, including SUNK, set endpoint_url to http://cwlota.com.
Workload Identity Federation in Kubernetes
This approach is best for workloads running inside CKS, where short-lived tokens are preferred over long-lived static credentials. When an OIDC token is available in a file and automatically rotated (as in Kubernetes and CKS), use the Container Credentials API. These configurations work with the AWS CLI, Boto3, and other S3 clients that use the AWS credential providers. Start with a basic config file for the endpoints:[ORG-ID] with your CoreWeave organization ID.
Your Org ID is a short hexadecimal string (for example, ab1cd2). Find it on the Settings page of your Cloud Console account.
Workload Identity Federation with a credential process
When you want federated credentials outside of CKS, such as on developer workstations or in CI environments, you can use a credential process. Without an auto-rotated token file, AWS SDKs support a Process Credential Provider that invokes a custom command to fetch credentials. This works for both human and machine workloads. The CoreWeave Intelligent CLI (cwic) provides a ready-made credential process that implements this pattern, including an on-disk cache that lets parallel processes share one credential.
For example, to exchange a CoreWeave API access token, add a line to your AWS config file (~/.aws/config) that invokes cwic auth accesskey api-token. The cwic command reads COREWEAVE_API_TOKEN, or the token stored by cwic auth login. Credentials are cached per token.
Configuration for a CoreWeave API access token
Custom script for credential process
If you want to use a custom script instead of thecwic auth accesskey commands, you can set the credential_process configuration to the path of your script. For example, if your script is in /bin/cw-auth.sh, you can set the credential_process configuration to:
Configuration with custom script for credential process
Standard JSON output format for credentials
- Check for cached credentials.
- Obtain a new OIDC token from your identity provider if the cached credentials are missing or expired.
- Exchange the token with the CoreWeave API for temporary credentials.
- Cache and return the response.