Skip to main content

Use Objects and Buckets

Interact with your buckets in Object Storage

This guide explains how to manage objects stored in CoreWeave AI Object Storage buckets using various tools, including the AWS CLI, s3cmd, and Boto3.

Prerequisites

This guide presumes you have the following:

Add objects

Ensure you have the AWS CLI installed and configured.

Use the s3 cp command to copy a file into a bucket addressed using the s3:// scheme.

Example command
$
aws s3 cp /path/to/my-file s3://my-bucket-name
Example output
upload: ./my-important-file.txt to s3://my-bucket-name/my-important-file.txt

List buckets and their contents

If you want to see all of your available buckets, use the ls command:

Example
$
aws s3 ls

To list all the objects currently in a bucket, use the ls command to target a bucket path.

Example
$
aws s3 ls s3://my-bucket-name

The terminal or command prompt will return a YAML file for your selected bucket, listing all objects within it, their sizes, and their last modified dates.

Example
2024-10-14 15:35:10 123456 my-first-file.txt
2024-10-14 16:45:22 234567 another-file-of-mine.txt

Delete an object from a bucket

To delete specific objects from a bucket, use the rm command with the AWS CLI.

Example
$
aws s3 rm s3://my-bucket-name/my-important-file.txt

When this succeeds, a confirmation message like this one is printed:

Example
$
delete: s3://my-bucket-name/my-important-file.txt
Learn more

For more information about accessing and interacting with the contents of your buckets, see the official Amazon documentation for s3 buckets.