For the complete documentation index, see llms.txt. This page is also available as Markdown.
AWS S3 Bucket
Upload Images from an AWS S3 bucket to Roboflow
For AWS S3, use Datasources and Bucket Mirror unless you explicitly need a one-time or ad hoc import. Datasources keep images and metadata in sync without scripts, presigned URLs, or local downloads.
This page covers fallback workflows for one-time or ad hoc uploads only:
Signed URLs: Upload images directly from S3 to Roboflow using presigned URLs, without downloading them locally first.
CLI Locally: Download images from S3 to your local machine, then upload them to Roboflow. Use this when you need to preprocess or inspect images before uploading.
If you are setting up a reusable connection between Roboflow and S3, stop here and use Datasources plus AWS S3 Credentials.
AWS CLI Setup
Before using the script, ensure AWS CLI has access to the target bucket.
For local one-time workflows, use a non-root AWS identity with the minimum bucket permissions you need. If your goal is ongoing S3 ingestion into Roboflow, do not reuse this local setup. Create a Datasource credential instead.
Once you've installed the AWS CLI, open a terminal or command prompt.
Run the following command:
awsconfigure
You'll be prompted to enter your AWS credentials:
AWS Access Key ID [None]: YOUR_ACCESS_KEY
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY
Default region name [None]: YOUR_PREFERRED_REGION (e.g., us-west-1)
Default output format [None]: json
Option 1: Upload Via Signed URL
Use this only for one-time or scripted imports where you do not want to create a Datasource.
You can generate signed URLs for your images in the S3 bucket by using boto3 in Python.
In the code snippet above, you need the name of your S3 bucket, the object name for the image in the S3 bucket, and the AWS region. The signed URL of the image is generated and returned.
Building around this, we can generate a complete solution that pulls all the available objects in the S3 bucket, and then uploads them to Roboflow via the API. An outline for this solution can be seen below:
Option 2: Download Data Locally from AWS
Use this only when you need local preprocessing, inspection, or file transformation before upload. Otherwise, use Datasources.
To upload data from AWS, first install the awsclicommand line tool. This tool allows you to interact with your AWS account on the command line. Once you have the command line tool installed, run the following command:
Replace mybucket with the name of your bucket and folder_path with the name of the folder or file you want to export. This command downloads assets from AWS to your current working directory (.).