Saturday, July 18, 2020

How to Switch Between AWS CLI Named Profiles

Create a named profile by opening your command line utility after installing the aws cli tools.

aws configure --profile hackbaby

Access ID
Secret Access Key

Now you have set a named profile (you can set multiple) make switching back and forth without a headache. Set your environment variables:

Window$: setx AWS_PROFILE hackbaby

Linux: export AWS_PROFILE=hackbaby

Close your command line tool. Re-open and then get to work. Close and re-open to flip between CLI profiles.