s3:PutBucketCORS action. This configuration defines which origins, HTTP methods, and headers are permitted. For more information about CORS, see CORS for Web Browser Access.
The following sections show two example CORS configurations.
Prerequisites
- Have the
Object Storage AdminIAM role (assigned through CoreWeave IAM Access Policies), or equivalent permissions to configure AI Object Storage access policies. - Ensure that your AI Object Storage organization or bucket access policies grant your principal the
s3:PutBucketCORSaction (ors3:*) on the target bucket. - Have the
aws s3apiCLI tool installed and configured for your AI Object Storage environment.
All origins GET request
This policy allows cross-origin resource sharing for a specific bucket. The policy has one statement that allows all origins to performGET requests on the bucket:
All origins GET request
*) to perform GET requests on the bucket. You can customize the AllowedOrigin, AllowedMethod, and AllowedHeader elements as needed.
To apply this CORS configuration, replace [BUCKET-NAME] with the name of your bucket, then run the following aws s3api command:
cors.xml file contains the CORS configuration in XML format, like the preceding example.
Specific origin with multiple methods
The following example restricts CORS to a specific origin and allows multiple HTTP methods and specific headers. The configuration also sets aMaxAgeSeconds value to cache the preflight response for 30 minutes and exposes a custom x-amz-request-id header to the client.
Restrict to a specific origin and multiple methods