AWS CLI Integration
Cloodsy S3 works seamlessly with the AWS CLI. This guide covers setup and common operations.
Configure a Named Profile
Create a dedicated AWS CLI profile for your Cloodsy S3 server:
aws configure --profile cloodsy
Enter your credentials when prompted:
AWS Access Key ID: your-access-key
AWS Secret Access Key: your-secret-key
Default region name: us-east-1
Default output format: json
Create a Shell Alias
Add this to your .bashrc or .zshrc for convenience:
alias s3="aws --endpoint-url http://localhost:9000 --profile cloodsy s3"
Now you can use:
s3 ls
s3 cp file.txt s3://my-bucket/
s3 ls s3://my-bucket/
Common Operations
Upload a file
aws --endpoint-url http://localhost:9000 s3 cp photo.jpg s3://photos/vacation/
Download a file
aws --endpoint-url http://localhost:9000 s3 cp s3://photos/vacation/photo.jpg ./
List objects
aws --endpoint-url http://localhost:9000 s3 ls s3://photos/
List objects recursively
aws --endpoint-url http://localhost:9000 s3 ls s3://photos/ --recursive
Delete an object
aws --endpoint-url http://localhost:9000 s3 rm s3://photos/vacation/photo.jpg
Sync a directory
aws --endpoint-url http://localhost:9000 s3 sync ./local-folder s3://backups/folder/
Copy between buckets
aws --endpoint-url http://localhost:9000 s3 cp s3://source/file.txt s3://dest/file.txt
Multipart Upload Threshold
For large files, the AWS CLI automatically uses multipart uploads. You can configure the threshold:
aws configure set s3.multipart_threshold 64MB --profile cloodsy
aws configure set s3.multipart_chunksize 16MB --profile cloodsy