AWS Command Line Interface (CLI)
This document provides instructions for working with the AWS CLI tool with your AWS account.
Summary
- Request AWS access from Organic Support.
- Create an AWS Access Key.
- Install the AWS CLI.
- 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
- Log into your AWS account.
- Click "Security credentials" under you user dropdown.
- Scroll down to "Access keys" section.
- Click "Create access key".
- Users are allowed a maximum of two access keys at a time, per Amazon's policies.
- Select "Command Line Interface (CLI)" as your use case.
- Check the Confirmation box & click "Next".
- Add a clear description tag value (example: "Local Development").
- Click "Create access key".
- 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:
Name | Value |
---|---|
AWS Access Key ID | Retrieve from Password Manager |
AWS Secret Access Key ID | Retrieve from Password Manager |
Default Region Name | us-west-2 |
Default Output Format | json |
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