Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 2.57 KB

aws-cli.md

File metadata and controls

65 lines (46 loc) · 2.57 KB
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 }}.

AWS CLI

The AWS CLI is a command line interface designed for AWS services. To learn how to run commands, see the official Amazon documentation.

Getting started {#before-you-begin}

  1. Create a service account.
  2. Assign the roles required for your project to the service account. For more information about roles, see the Identity and Access Management documentation.
  3. 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.

Installation {#installation}

{% include install-aws-cli %}

Setup {#setup}

To configure the AWS CLI, run the aws configure command in your terminal. The command will request values for the following parameters:

  1. AWS Access Key ID: ID of the static key created when getting started.

  2. AWS Secret Access Key: Contents of the static access key.

  3. 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.

  4. Leave the other parameter values unchanged.

Configuration files {#config-files}

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.