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.
Prerequisites
Section titled “Prerequisites”- 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).
Install
Section titled “Install”# Debian/Ubuntusudo apt install awscli# macOSbrew install awscli# or the official bundle: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.htmlConfigure a profile
Section titled “Configure a profile”Store the credentials in a named profile so you don’t repeat them on every command:
aws configure set aws_access_key_id WSS... --profile webshieldaws configure set aws_secret_access_key <secret> --profile webshieldaws configure set region us-east-1 --profile webshieldThe region value is not used by WebShield but some tooling expects it to be set.
Everyday commands
Section titled “Everyday commands”Pass --endpoint-url and your profile on each call:
alias ws='aws --profile webshield --endpoint-url https://s3.webshield.pro'
ws s3 ls # list your bucketsws s3 ls s3://u42-backups/ # list objects in a bucketws s3 cp ./dump.sql.gz s3://u42-backups/db/# upload a filews s3 cp s3://u42-backups/db/dump.sql.gz . # download a filews s3 sync ./media s3://u42-backups/media # sync a directoryws s3 rm s3://u42-backups/db/dump.sql.gz # delete an objectMultipart upload for large files is handled automatically by aws s3 cp/sync.
Low-level s3api
Section titled “Low-level s3api”The s3api subcommands work too, for operations s3 does not expose:
ws s3api head-object --bucket u42-backups --key db/dump.sql.gzws 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 rbare not available. - If the account balance goes negative, storage becomes read-only:
cp/syncuploads fail while downloads keep working. Top up the balance to restore writes.