Skip to main content

AWS Command Line Interface (CLI)

This document provides instructions for working with the AWS CLI tool with your AWS account.

Summary

  1. Request AWS access from Organic Support.
  2. Create an AWS Access Key.
  3. Install the AWS CLI.
  4. Configure an AWS CLI Profile.

Request AWS Access

In order to leverage Organic's full capabilities locally, AWS access is required. By setting up the AWS CLI tool, developers will be able to interact with backups and upload files to development S3 buckets when working locally. Without setting up the AWS CLI tool, features that involve upload functionality will not function.

Please contact Organic Support if you have not been provided AWS access and require it for local development.

Create an AWS Access Key

  1. Log into your AWS account.
  2. Click "Security credentials" under you user dropdown.
  3. Scroll down to "Access keys" section.
  4. Click "Create access key".
    • Users are allowed a maximum of two access keys at a time, per Amazon's policies.
  5. Select "Command Line Interface (CLI)" as your use case.
  6. Check the Confirmation box & click "Next".
  7. Add a clear description tag value (example: "Local Development").
  8. Click "Create access key".
  9. Download the credential file using the "Download .csv file" and save in you password manager. You'll use it shortly.

Install the AWS CLI tool

To install with Homebrew, open a shell and run:

brew install awscli

Otherwise, follow the instructions for your operating system found in the AWS CLI Install/Update doc.

Check your AWS CLI version

To ensure the AWS CLI has been installed correctly (and to verify its version), run:

aws --version

Configure your AWS Profile

To configure your default AWS Profile locally, run:

aws configure

If you're managing multiple AWS accounts, you should create a named profile instead:

aws configure --profile=organic

You'll be prompted to enter the following details:

NameValue
AWS Access Key IDRetrieve from Password Manager
AWS Secret Access Key IDRetrieve from Password Manager
Default Region Nameus-west-2
Default Output Formatjson

You can confirm your profile has been created successfully by running:

aws configure list

Additional Resources

Below you will find some additional tips and tricks for working with the AWS CLI.

Switching Between AWS Profiles

You can switch profiles by setting the AWS_PROFILE environment variable.

To get a list of AWS profiles you've configured, run:

aws configure list-profiles

To switch to a specific profile, run:

export AWS_PROFILE=<YOUR_PROFILE_NAME>

To confirm you've successfully switched to the profile, run:

aws configure list