Search
⌃K

Set a Default AWS Profile

In some cases, developers may have multiple AWS profiles, and the veloctl CLI enable-cloud-resources command works with the default profile.
This guide will walk you through the process of selecting a default AWS profile, which you'd like Velocity to use to spin up AWS cloud resources associated with your Velocity Environments.

Defining Multiple AWS Profiles

AWS Profiles are defined in ~/.aws/credentials as follows:
[default]
aws_access_key_id=MY_ACCESS_KEY_ID
aws_secret_access_key=MY_SECRET_ACCESS_KEY
[profile-2]
aws_access_key_id=MY_OTHER_ACCESS_KEY_ID
aws_secret_access_key=MY_OTHER_SECRET_ACCESS_KEY
[profile-3]
aws_access_key_id=MY_OTHER_ACCESS_KEY_ID
aws_secret_access_key=MY_OTHER_SECRET_ACCESS_KEY

Selecting a Default Profile

The following commands will set one of your multiple AWS Profiles as the default via an environment variable in the current terminal session:
# Linux and MacOS
export AWS_PROFILE=admin
# Windows Command Prompt
setx AWS_PROFILE profile-2
# PowerShell
$Env:AWS_PROFILE="profile-3"
Adding the appropriate line from the above codeblock to your ~/.bashrc or equivilent file will set your preferred default user automatically each time you open a terminal.