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:
...
endpoint = awscli_plugin_endpoint
[profile default]
ca_bundle = /etc/pki/tls/certs/ca-bundle.crt
aws_access_key_id = xxx
aws_secret_access_key = xxx
...
endpoint_url = https://tb-cloud-api-pub.cr.cnaf.infn.it:80807480
signature_version = s3
...
(NG-ffornari-tier1) [ffornari@tb-cloud-ui test_clients]# aws s3 ls testpippo
2020-07-02 12:17:39 6 pippo.txt
...