How to Generate EC2 Credentials on EO-Lab

Attention

Before you attempt to perform the CLI operations, follow this article How to install OpenStackClient for Linux on EO-Lab to make sure that Python-openstackclient has been installed.

EC2 credentials are used for accessing private S3-Buckets.

Users can generate EC2 credentials on their own by completing the following steps:

  1. Log in to the Horizon dashboard and click on API Access in the Project section.

../_images/ec2_1.png
  1. Click on the Download OpenStack RC File:

../_images/ec2_2.png
  1. Choose OpenStack RC File:

../_images/ec2_3.png
  1. Save your file on the hard disk and open your Terminal.

  2. Enter the commands below:

(A virtual environment called “openstack” has been created for the purposes of this tutorial and consists of python-openstackclient set of packages.)

source test/test-openrc.sh
Please enter your OpenStack Password for project test as user [email protected]:
source openstack_cli/bin/activate
(openstack_cli) user@station:~$ openstack ec2 credentials create
  1. The output should look similar to this:

+------------+-------------------------------------+
| Field      | Value                               |
+------------+-------------------------------------+
+--------------------------------------------------+
| access     | [access key]                        |
| links      | [link]                              |
| project_id | db39778a89b242f0a8ba818eaf4f3329    |
| secret     | [secret key]                        |
| trust_id   | None                                |
| user_id    | 121fa8dadf084e2fba46b00850aeb7aa    |
+------------+-------------------------------------+
  1. Save both the Access and Secret key.

In case of errors, you may grant access to your credential record by using the command:

(openstack_cli) user@station:~$ openstack ec2 credentials list

+--------------------+------------------------+-------------------+---------------+
| Access             | Secret                 | Project ID        | User ID       |
+--------------------+------------------------+-------------------+---------------+
| [access key]       | [secret key]           | [project id]      | [user id]     |
+--------------------+------------------------+-------------------+---------------+