Create and Use an AWS CLI Profile

In this blog post, I will show you how to create and use AWS CLI profiles and why they are so good.

About Aws CLI Profiles

AWS CLI profiles, allow us to manage multiple AWS tenants using AWS CLI without reconfiguring the CLI.

For example, I can run commands on my Free tier tenant and on my non-free tier tenant.

Create a Profile

To get started, I will show you how to create a profile called prod.

Open your command-line tool and run the following command:

aws configure --profile prod

After running the command, follow the prompts and enter the secret key and password of your account.

Use a different profile

To use your newly created profile, you type any command and use the –profile switch as shown below

aws s3 ls --profile prod

 If you don’t use the switch, AWS CLI will use the default configuration which you configured using the aws configure command without the profile option.

Processing…
Success! You're on the list.

Posted

in

,

by