S3cmd is in my opinion just better than aws-cli on most Linux distros, I found that it's available in most package managers and just installs and works. Never have to deal with dumb plugins, never having to search in weird third party repos, never having to deal with two different major versions with incompatibilities. S3cmd just works, which is great when relying on it for things like automated backups.
To set up and use
s3cmd on most Linux distributions, you can follow these steps:
Install s3cmd: First, you need to install
s3cmd. Depending on your Linux distribution, you can typically install it using the package manager.
For example, on Ubuntu/Debian:
sudo apt-get update
sudo apt-get install s3cmd
sudo yum install s3cmd
Configure s3cmd: After installation, you need to configure
s3cmd with your AWS credentials. Run:
Follow the prompts to enter your Access Key, Secret Key, and preferred encryption settings.
Test s3cmd: You can now test
s3cmd by listing your buckets or performing other operations. For example:
This command will list all buckets associated with your AWS account.
Usage: Now, you can start using
s3cmd to interact with your S3 buckets. Here are a few common commands:
s3cmd ls s3://bucket-name: List objects in a bucket.
s3cmd put file.txt s3://bucket-name: Upload a file to a bucket.
s3cmd get s3://bucket-name/file.txt: Download a file from a bucket.
s3cmd mb s3://new-bucket: Create a new bucket.
s3cmd rb s3://bucket-name: Remove a bucket (make sure it's empty first).
Make sure to replace
bucket-name with the name of your bucket and
file.txt with the name of the file you want to upload/download.
Remember to always be cautious when handling AWS credentials and data.