Skip to main content

EC2 credentials

The procedure in this walkthrough uses POSIX-compliant tooling. Windows users therefore need to install utilities that bring POSIX support to Windows (for example CygWin), which is outside the scope of this document.

To create an EC2 credential you need to:

Creating EC2 credentials​

To obtain the EC2 credentials, run the following command:

curl -s -X POST -H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_TOKEN" \
-d '{"tenant_id": "'$OS_PROJECT_ID'"}' \
"${OS_AUTH_URL}/v${OS_IDENTITY_API_VERSION}/users/${OS_USER_ID}/credentials/OS-EC2" | jq .

The output looks something like this:

NNumbers Cloud console, EC2 credentials: the output looks something like this

From the payload above, use the access and secret fields. They correspond to ACCESS KEY and SECRET KEY EC2 respectively.

Deleting EC2 credentials​

To delete the EC2 credentials, use the DELETE verb instead of the POST used to create them, together with the token and the link returned in the self field of the creation payload, as shown below:

curl -s -X DELETE -H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_TOKEN" \
-d '{"tenant_id": "$OS_PROJECT_ID"}' \
"${OS_AUTH_URL}/v${OS_IDENTITY_API_VERSION}/users/${OS_USER_ID}/credentials/OS-EC2"

Walkthrough: Creating secrets in the NNumbers Cloud KMS

Next steps​