Sitemap

How to Create & Switch between AWS profile easily

Feb 10, 2025

Fir you go to AWS console of your user and set the credential

Note that you can see your credential only once.

Now set up the AWS CLI with :

aws configure --profile mynewprofile

Then export (this is for AWS CLI v2)

export AWS_PROFILE=mynewprofile

Then test the output with

aws s3 ls

Troubleshooting : AWS_PROFILE not working or not correct account

See the problem here

aws configure list

If you see ACCESS_KEY and SECRET_KEY is set differently from you account

You might have somthing in .zshrc , .bash_profile or other environment set. So it read the credential from there.

--

--

tanut aran
tanut aran

Written by tanut aran

Co-founder and Coder at work !

No responses yet