Skip to content

AWS CLI with WebShield S3

The official AWS CLI works with WebShield object storage — you only need to point it at the WebShield endpoint. See Object storage for how to obtain your keys and create buckets.

  • Endpoint: https://s3.webshield.pro
  • Access Key ID and Secret Access Key from the S3 storage page in the control panel.
  • The full bucket name including the account prefix (for example, u42-backups).
Terminal window
# Debian/Ubuntu
sudo apt install awscli
# macOS
brew install awscli
# or the official bundle: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

Store the credentials in a named profile so you don’t repeat them on every command:

Terminal window
aws configure set aws_access_key_id WSS... --profile webshield
aws configure set aws_secret_access_key <secret> --profile webshield
aws configure set region us-east-1 --profile webshield

The region value is not used by WebShield but some tooling expects it to be set.

Pass --endpoint-url and your profile on each call:

Terminal window
alias ws='aws --profile webshield --endpoint-url https://s3.webshield.pro'
ws s3 ls # list your buckets
ws s3 ls s3://u42-backups/ # list objects in a bucket
ws s3 cp ./dump.sql.gz s3://u42-backups/db/# upload a file
ws s3 cp s3://u42-backups/db/dump.sql.gz . # download a file
ws s3 sync ./media s3://u42-backups/media # sync a directory
ws s3 rm s3://u42-backups/db/dump.sql.gz # delete an object

Multipart upload for large files is handled automatically by aws s3 cp/sync.

The s3api subcommands work too, for operations s3 does not expose:

Terminal window
ws s3api head-object --bucket u42-backups --key db/dump.sql.gz
ws s3api list-objects-v2 --bucket u42-backups --prefix db/
  • WebShield uses path-style addressing (https://s3.webshield.pro/<bucket>/<key>); the AWS CLI selects it automatically when a custom endpoint is set.
  • Buckets are created and deleted only in the control panel — s3 mb/s3 rb are not available.
  • If the account balance goes negative, storage becomes read-only: cp/sync uploads fail while downloads keep working. Top up the balance to restore writes.