The AWS Command Line Interface is a tool that can be used to interact with Amazon Web Services in a command-line shell, but only the S3 commands are relevant to the USS S3 gateway.
The AWS CLI tool is available for Windows, macOS and Linux. The steps below show how the tool can be installed and used on CentOS Linux. Installation and usage instructions for other operating systems can be found here:
Install awscli
[user@localhost ~]$ sudo yum install awscli
Configure awscli
[user@localhost ~]$ aws configure AWS Access Key ID [None]: <username> AWS Secret Access Key [None]: <password> Default region name [None]: [Enter] Default output format [None]: [Enter]
Run awscli
create a new bucket:
[user@localhost ~]$ aws –endpoint-url <endpoint-url> s3 mb s3://<bucket-name>
list all buckets:
[user@localhost ~]$ aws –endpoint-url <endpoint-url> s3 ls
sync a local directory to a bucket with a specific prefix
[user@localhost ~]$ aws –endpoint-url <endpoint-url> s3 sync /home/user/downloads/ s3://mybucket/mydownloads/
More examples can be found here: