Most of the s3 and s3api commands from the aws cli documentation will work with our storages.
Our storage in Global 1 location is built on ceph. Here is a list of supported Amozon S3 API requests.
Adding --endpoint-url option to the commands
This method doesn't require additional configuration.
To run a command add --endpoint-url option at the end.
In the examples below we use Global 2 (US East) endpoint URL. URLs for other locations can be found here.
Examples
Create bucket:
aws s3api create-bucket --bucket my_bucket --endpoint-url=https://s3.us-east.gcorelabs.com
Upload files to bucket:
aws s3 sync C:\files_to_upload s3://my_bucket/ --endpoint-url=https://s3.us-east.gcorelabs.com
Important! By default, created buckets and all the stored files in buckets are private. To grant access to read files, add --acl public-read to a request (a list of all the available rights in the documentation).
Adjust file ACL:
aws s3api put-object-acl --bucket my_bucket --key cat.jpg --acl public-read --endpoint-url=https://s3.us-east.gcorelabs.com
Empty bucket:
aws s3 rm s3://my-bucket --recursive --endpoint-url=https://s3.us-east.gcorelabs.com
Delete bucket:
aws s3api delete-bucket --bucket my-bucket --endpoint-url=https://s3.us-east.gcorelabs.com
Using awscli-plugin-endpoint
Follow the instructions on how to download and set up the plugin, and also see the command examples here: https://github.com/wbingli/awscli-plugin-endpoint