Datacenter availability
The S3-compatible API is available for network volumes in select datacenters. Each datacenter has a unique endpoint URL that you’ll use when calling the API:Setup and authentication
Create a network volume
Create an S3 API key
- Go to the Settings page in the Runpod console.
- Expand S3 API Keys and select Create an S3 API key.
- Name your key and select Create.
- Save the access key (e.g.,
user_***...) and secret (e.g.,rps_***...) to use in the next step.
Configure AWS CLI
- If you haven’t already, install the AWS CLI on your local machine.
- Run the command
aws configurein your terminal. - Provide the following when prompted:
- AWS Access Key ID: Enter your Runpod user ID. You can find this in the Secrets section of the Runpod console, in the description of your S3 API key. By default, the description will look similar to:
Shared Secret for user_2f21CfO73Mm2Uq2lEGFiEF24IPw 1749176107073.user_2f21CfO73Mm2Uq2lEGFiEF24IPwis the user ID (yours will be different). - AWS Secret Access Key: Enter your Runpod S3 API key’s secret access key.
- Default Region name: You can leave this blank.
- Default output format: You can leave this blank or set it to
json.
- AWS Access Key ID: Enter your Runpod user ID. You can find this in the Secrets section of the Runpod console, in the description of your S3 API key. By default, the description will look similar to:
~/.aws/credentials).Managing credentials
Managing credentials
Verifying your AWS configuration
If you’re experiencing authentication issues, use the following command to check your current AWS configuration:Environment variables override config files
AWS CLI uses the following priority order for credentials (highest to lowest):- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - AWS credentials file (
~/.aws/credentials) - AWS config file (
~/.aws/config)
-
Check for existing environment variables:
-
If outdated environment variables are set, unset them:
-
Verify your configuration again:
Using the S3-compatible API
You can use the S3-compatible API to interact with your Runpod network volumes using standard S3 tools: Standard AWS CLI operations such asls, cp, mv, and rm work as expected for most file operations. The sync command works for basic use cases but may encounter issues with large numbers of files (10,000+) or complex directory structures.
Network volume path mapping
Network volume path mapping
/runpod-volume and to Pods at /workspace by default. The S3-compatible API maps file paths as follows:- Pod filesystem path:
/workspace/my-folder/file.txt - Serverless worker path:
/runpod-volume/my-folder/file.txt - S3 API path:
s3://NETWORK_VOLUME_ID/my-folder/file.txt
s3 CLI examples
When usingaws s3 commands, you must pass in the endpoint URL for your network volume using the --endpoint-url flag and the datacenter ID using the --region flag.
Unlike traditional S3 key-value stores, object names in the Runpod S3-compatible API correspond to actual file paths on your network volume. Object names containing special characters (e.g., #) may need to be URL-encoded to ensure proper processing.
List objects
List objects
ls to list objects in a network volume directory:ls and ListObjects operations will list empty directories.Transfer files
Transfer files
cp to copy a file to a network volume:cp to copy a file from a network volume to a local directory:Remove files
Remove files
rm to remove a file from a network volume:Sync directories
Sync directories
s3api CLI example
You can also useaws s3api commands (instead of aws s3) to interact with the S3-compatible API.
For example, here’s how you could use aws s3api get-object to download an object from a network volume:
LOCAL_FILE with the desired path and name of the file after download—for example: ~/local-dir/my-file.txt.
For a list of available s3api commands, see the AWS s3api reference.
Boto3 Python example
You can also use the Boto3 library to interact with the S3-compatible API, using it to transfer files to and from a Runpod network volume. The script below demonstrates how to upload a file to a Runpod network volume using the Boto3 library. It takes command-line arguments for the network volume ID (as an S3 bucket), the datacenter-specific S3 endpoint URL, the local file path, the desired object (file path on the network volume), and the AWS Region (which corresponds to the Runpod datacenter ID).Boto3 script
Boto3 script
AWS_ACCESS_KEY_ID: Should be set to your Runpod S3 API key access key (e.g.,user_***...).AWS_SECRET_ACCESS_KEY: Should be set to your Runpod S3 API key’s secret (e.g.,rps_***...).
Example usage
Example usage
put_objects method above, you must specify these arguments:file_path: The local source file (e.g.,local_directory/file.txt).object_name: The remote destination file to be created on the network volume (e.g.,remote_directory/file.txt).
Uploading very large files
You can upload large files to network volumes using S3 multipart upload operations (see the compatibility reference below). You can also download this helper script, which dramatically improves reliability when uploading very large files (10GB+) by handling timeouts and retries automatically. Click here to download the script on GitHub. Here’s an example of how to run the script using command line arguments:S3 API compatibility reference
The tables below show which S3 API operations and AWS CLI commands are currently supported. Use the tables below to understand what functionality is available and plan your development workflows accordingly. For detailed information on these operations, refer to the AWS S3 API documentation.Core operations
Core operations
Multipart upload operations
Multipart upload operations
Bucket management operations
Bucket management operations
Access control and permissions
Access control and permissions
Object metadata and tagging
Object metadata and tagging
Encryption and security
Encryption and security
Known issues and limitations
ListObjects runs slowly or fails with "same next token" error
ListObjects runs slowly or fails with "same next token" error
aws s3 ls or ListObjects on a directory with many files or large amounts of data (typically >10,000 files or >10 GB of data) for the first time, it may run very slowly, or you may encounter the following error:ListObjects request must wait until the checksum is ready.Workarounds:- The operation will typically complete successfully if you wait for the process to finish.
- If the client aborts with a pagination error, retry the operation after a brief pause.
Storage and time synchronization
Storage and time synchronization
- Storage capacity: Network volumes have a fixed storage capacity, unlike the virtually unlimited storage of standard S3 buckets. The
CopyObjectandUploadPartactions do not check for available free space beforehand and may fail if the volume runs out of space. - Maximum file size: 4TB (the maximum size of a network volume).
- Object names: Unlike traditional S3 key-value stores, object names in the Runpod S3-compatible API correspond to actual file paths on your network volume. Object names containing special characters (e.g.,
#) may need to be URL encoded to ensure proper processing. - Time synchronization: Requests that are out of time sync by 1 hour will be rejected. This is more lenient than the 15-minute window specified by the AWS SigV4 authentication specification.
Multipart uploads
Multipart uploads
- The maximum size for a single part of a multipart upload is 500MB.
- The AWS S3 minimum part size of 5MB is not enforced.
- Multipart upload parts and metadata are stored in a hidden
.s3compat_uploads/folder. This folder and its contents are automatically cleaned up when you callCompleteMultipartUploadorAbortMultipartUpload.
aws s3 sync limitations
aws s3 sync limitations
aws s3 sync command has limited support in Runpod’s S3-compatible API. While it works for basic use cases (syncing small numbers of files and simple directory structures), you may encounter errors when syncing directories with very large numbers of files (over 10,000) or complex nested structures.Common issues include:- EOF errors with 200 OK responses.
- Duplicate ContinuationToken errors in ListObjectsV2.
- Intermittent AccessDenied errors.
cp commands for better reliability. Full sync support is in development.Timeout configuration for large files
Timeout configuration for large files
CompleteMultipartUpload operation. To resolve this, we recommend using the multipart upload helper script.Or you can try increasing the timeout settings in your AWS tools:- AWS CLI
- Boto3
aws s3 and aws s3api, use the --cli-read-timeout parameter:~/.aws/config: