First thing to do is to install awscli and awscli-plugin-endpoint (e.g.: pip install awscli && pip install awscli-plugin-endpoint).
Then you need to create Openstack EC2 credentials (or get them created) for your user and project with the following command:
openstack credential create --type ec2 --project <project> <user> '{"access": "<aws_access_key>", "secret": "<aws_secret_key>"}'
Finally, with your aws credentials, you must create the awscli configuration file ~/.aws/config with, for instance, the following content:
[default]
region = tier1
[plugins]
endpoint = awscli_plugin_endpoint
[profile default]
aws_access_key_id = xxx
aws_secret_access_key = xxx
s3 =
endpoint_url = https://tb-cloud-api-pub.cr.cnaf.infn.it:8080
signature_version = s3
It's really important to set signature_version = s3. At this point, you should be ready to reference your containers and objects:
(NG-ffornari-tier1) [ffornari@tb-cloud-ui test_clients]# aws s3 ls
2009-02-03 17:45:09 pippo
(NG-ffornari-tier1) [ffornari@tb-cloud-ui test_clients]# aws s3 ls pippo
2020-07-02 12:17:39 6 pippo.txt
(NG-ffornari-tier1) [ffornari@tb-cloud-ui test_clients]#