Quickstarts
AWS CLI
Upload, list, download and delete Shelby objects with the AWS CLI.
Before you start
- AWS CLI v2
- Your access key ID, API key and bucket name from console.shelby.xyz
Export your credentials and bucket name from the console so the commands below can use them:
export SHELBY_ACCESS_KEY_ID="<your access key ID, SHLB…>"
export SHELBY_SECRET_ACCESS_KEY="<your API key>"
export SHELBY_BUCKET="<your bucket name>"Create a shelby profile
aws configure set aws_access_key_id "$SHELBY_ACCESS_KEY_ID" --profile shelby
aws configure set aws_secret_access_key "$SHELBY_SECRET_ACCESS_KEY" --profile shelby
aws configure set region default --profile shelby
aws configure set endpoint_url https://s3.beta.shelby.xyz --profile shelby
aws configure set s3.addressing_style path --profile shelby
aws configure set request_checksum_calculation when_required --profile shelbyThe last setting stops the CLI from sending uploads in aws-chunked framing, which it
does by default (CLI 2.23 and later) and Shelby doesn't accept yet. Without it, uploads
fail with 501 NotImplemented.
Upload a file
export AWS_PROFILE=shelby
echo "Hello, Shelby" > hello.txt
aws s3 cp hello.txt "s3://$SHELBY_BUCKET/examples/hello.txt"List and download it
aws s3 ls "s3://$SHELBY_BUCKET/examples/"
aws s3 cp "s3://$SHELBY_BUCKET/examples/hello.txt" hello-copy.txtA new object can take a few seconds to appear in listings. If the listing is empty, run it again.
Clean up
aws s3 rm "s3://$SHELBY_BUCKET/examples/hello.txt"Sync a directory
aws s3 sync ./data "s3://$SHELBY_BUCKET/data/"Large files are uploaded in parts automatically.
What's different with the AWS CLI
aws s3 mv, andaws s3 cpfrom one Shelby key to another, fail. Both need server-side copy. Download the object and upload it again instead.aws s3 ls,syncandrm --recursivecan miss objects written in the last few seconds. They work from listings, and a new object takes a few seconds to appear in one. Asyncstraight after an upload can upload the same file again.- Files over about 23 GiB need a larger part size. Shelby allows 3,000 parts per
upload, and the CLI's default part size is 8 MiB. Raise it with
aws configure set s3.multipart_chunksize 64MB --profile shelby.