Skip to main content

AWS CLI

The AWS CLI works with Fil One out of the box. Install it, configure your credentials, and use --endpoint-url https://eu-west-1.s3.fil.one on every command — or set it as a profile default so you never have to type it.

Installation

pip install awscli
# or
brew install awscli

Configuration

Add a filone profile to your AWS config files so you don't have to pass --endpoint-url on every command:

# ~/.aws/config
[profile filone]
endpoint_url = https://eu-west-1.s3.fil.one
region = eu-west-1
# ~/.aws/credentials
[filone]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY

Then use --profile filone (or AWS_PROFILE=filone) on every command:

aws s3 ls --profile filone

Or set it for your shell session:

export AWS_PROFILE=filone
aws s3 ls

Option 2: Default profile with env vars

export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
export AWS_DEFAULT_REGION=eu-west-1

Then pass --endpoint-url on each command:

aws s3 ls --endpoint-url https://eu-west-1.s3.fil.one

Core operations

Create a bucket

aws s3 mb s3://my-bucket --profile filone

Upload a file

aws s3 cp report.pdf s3://my-bucket/reports/report.pdf --profile filone

Upload a directory

aws s3 sync ./local-folder s3://my-bucket/folder/ --profile filone

List objects

aws s3 ls s3://my-bucket/ --profile filone
# Recursive listing with sizes
aws s3 ls s3://my-bucket/ --recursive --human-readable --profile filone

Download a file

aws s3 cp s3://my-bucket/reports/report.pdf ./report.pdf --profile filone

Download a directory

aws s3 sync s3://my-bucket/folder/ ./local-folder --profile filone

Delete an object

aws s3 rm s3://my-bucket/reports/report.pdf --profile filone

Delete a bucket

A bucket must be empty before it can be deleted. The --force flag has the AWS CLI empty the bucket client-side first — this is a CLI convenience, not an API feature.

aws s3 rb s3://my-bucket --force --profile filone

Multipart uploads

The AWS CLI handles multipart uploads automatically. You can configure the threshold:

# Set multipart threshold to 100 MB (default is 8 MB)
aws configure set default.s3.multipart_threshold 100MB --profile filone
aws configure set default.s3.multipart_chunksize 50MB --profile filone

Cleanup incomplete multipart uploads

# List incomplete uploads
aws s3api list-multipart-uploads --bucket my-bucket --profile filone

# Abort a specific incomplete upload
aws s3api abort-multipart-upload \
--bucket my-bucket \
--key large-file.zip \
--upload-id YOUR_UPLOAD_ID \
--profile filone

See the S3 Compatibility Reference for the full list of supported operations.