Manage Assets Using AWS CLI
To connect to the Servd Assets Platform using AWS CLI, first ensure you have an up-to-date version installed.
We recommend adding Servd as an additional AWS profile. In order to do so you'll need to add the following to your AWS credentials files:
[default] ** Your default account settings ** [profile servd] region = eu-central-003 endpoint-url = s3.eu-central-003.backblazeb2.com
[default] ** Your deafult account credentials ** [servd] aws_access_key_id = [ACCESS KEY ID from the Servd dashbaord] aws_secret_access_key = [ACCESS KEY SECRET from the Servd dashbaord]
Once the new profile has been added you can test the connection by running:
aws --profile servd --endpoint-url https://s3.eu-central-003.back... s3 ls s3://cdn-assets-servd-host/[PROJECT SLUG]/
Using Docker #
If you have docker installed you can use a single command to run a disposable container without having to set up profiles first.
You will need to update the Access Key, Access Key Secret, Project Slug and directory paths.
Be aware that this will leave your secret and key in the terminal history so you might want to clean that up or prevent it via the mechanism offered by your shell.
docker run --rm -it -v `pwd`:/curdir -v ~/.aws:/root/.aws -e AWS_ACCESS_KEY_ID=[your-access-key-id] -e AWS_SECRET_ACCESS_KEY=[your-secret] amazon/aws-cli --endpoint-url=https://s3.eu-central-003.backblazeb2.com s3 sync /curdir/assets/ s3://cdn-assets-servd-host/[project-slug]/staging/assets/