How to access private object storage using s3cmd or boto3?

Before attempting to perform operations concerning this FAQ, please familiarize yourself with:

How to generate EC2 credentials?

EC2 are being used in getting access to the private bucket.
Users are able to generate ec2 credentials on their own by following those steps:


Log in to the Horizon Panel and click on the API Access in the Project branch.

Click on the Download Openstack RC File:

Choose the latest version 3 (Identity API v3):

Save your file on the hard disk and open your Terminal.

Type in commands presented below.

Virtual environment called "openstack" has been created for the FAQ purposes and consists of python-openstackclient packages.

user@station:~$ workon openstack
(openstack) user@station:~$ source cloud_02722\ project_with_eo-openrc.sh
Please enter your OpenStack Password for project cloud_02722 project_with_eo as user john.doe@cloudferro.com:
(openstack) user@station:~$ openstack ec2 credentials create


+------------+-------------------------------------+ | Field | Value | +------------+-------------------------------------+ +--------------------------------------------------+ | access | [access key] | | links | [link] | | project_id | db39778a89b242f0a8ba818eaf4f3329 | | secret | [secret key] | | trust_id | None | | user_id | 121fa8dadf084e2fba46b00850aeb7aa | +------------+-------------------------------------+

Save access and secret key value.

In the case of failure, you may grant access to your credential record by typing in command:

(openstack) user@station:~$ openstack ec2 credentials list +----------------------------------+----------------------------------+ | Access | Secret | +----------------------------------+----------------------------------+ | [access key] | [secret key] | +----------------------------------+----------------------------------+


S3cmd is installed on your virtual machine by default.

Use this command to create a configuration file (.s3cfg):

s3cmd --configure

Please follow those steps in order to accomplish configuration:

Make sure about the values you have filled in a while ago.


In order to list available buckets type in command presented below:

To examine a particular bucket add its path:

Boto3 module installation

We strongly recommend using virtualenv for isolating python packages. 

If virtualenv is activated:

Or if we install the package with global entry point:

Simple script for accessing your private bucket:

Save your file with .py extension and run with the "python [filename.py]" command in your terminal.

For Python3 use "python3 [filename.py]".

Was this article helpful?