title | description |
---|---|
Using {{ postbox-full-name }} via the AWS CLI |
In this article, you will learn how to install and set up the AWS CLI for working with {{ postbox-name }}. |
The AWS CLI is a command line interface designed for AWS services. To learn how to run commands, see the official Amazon documentation.
- Create a service account.
- Assign the roles required for your project to the service account. For more information about roles, see the Identity and Access Management documentation.
- Create static access keys. Save the ID and secret key to a secure location. You will not be able to view the secret key parameters again after you close the window.
{% include install-aws-cli %}
To configure the AWS CLI, run the aws configure
command in your terminal. The command will request values for the following parameters:
-
AWS Access Key ID
: ID of the static key created when getting started. -
AWS Secret Access Key
: Contents of the static access key. -
Default region name
:{{ region-id }}
.To work with {{ postbox-name }}, always specify
{{ region-id }}
as the region. A different region value may lead to an authorization error. -
Leave the other parameter values unchanged.
The aws configure
command saves the static key and the region.
-
Static key format in
.aws/credentials
:[default] aws_access_key_id = <static_key_ID> aws_secret_access_key = <static_key_contents>
-
Default region format in
.aws/config
:[default] region = {{ region-id }}
-
You can create multiple profiles for different service accounts by specifying their details in the
.aws/credentials
file:[default] aws_access_key_id = <ID_of_static_key_1> aws_secret_access_key = <contents_of_static_key_1> [<name_of_profile_2>] aws_access_key_id = <ID_of_static_key_2> aws_secret_access_key = <contents_of_static_key_2> ... [<name_of_profile_n>] aws_access_key_id = <ID_of_static_key_n> aws_secret_access_key = <contents_of_static_key_n>
Where
default
is the default profile.