- 04 Nov 2024
- 1 Minute to read
- Print
- PDF
s4cmd With Wasabi
- Updated on 04 Nov 2024
- 1 Minute to read
- Print
- PDF
How do I use s4cmd with Wasabi?
s4cmd v2.1.0 and higher is validated for use with Wasabi. Versions of s4cmd below the 2.1.0 release do not support the --endpoint_url
flag, which is required when using s4cmd with Wasabi. To use s4cmd with Wasabi, please follow the config tips below.
Note that this example discusses the use of Wasabi's us-east-1 storage region. To use other Wasabi storage regions, please use the appropriate Wasabi service URL as described in this article.
Installation
To install s4cmd, use the pip installer:
pip install s4cmd
Copy or create a symbolic link so you can run s4cmd.py
as s4cmd
:
ln -s .local/lib/python3.7/site-packages/s4cmd.py s4cmd
Note: The above example was given on a Linux machine and the directory path may be different for your system.
Configuring s4cmd
s4cmd uses the same credentials file as AWS CLI. If this is already configured to work with Wasabi, then no additional steps are require. It is important to note that s4cmd does not recognize the use of credential profiles.
If you do not already have a credentials file from AWS CLI configured, follow these steps:
$ mkdir ~/.aws
Then create and edit the credentials file to contain your access key pair:
$ vi ~/.aws/credentials
[default]
aws_access_key_id = TH15ISN0T4R34LPU8K3Y
aws_secret_access_key = th15i54Ls0n0t4rea1k3ySEcr3TeiTHeRn012340
Using s4cmd
Once configured with credentials, you may run some test commands to confirm function:
List your Wasabi buckets out:
$ s4cmd --endpoint-url=https://s3.wasabisys.com ls
Make a bucket on the us-east-1 region:
$ s4cmd --endpoint-url=https://s3.wasabisys.com mb s3://mybucket
Copy a file up to Wasabi:
$ s4cmd --endpoint-url=https://s3.wasabisys.com cp image.jpg s3://mybucket
Copy a file from Wasabi down to working directory:
$ s4cmd --endpoint-url=https://s3.wasabisys.com cp s3://mybucket/image.jpg .
For a full list of commands and features, visit the official s4cmd page.
If you have any questions about using s4cmd with Wasabi, please contact us at support@wasabi.com