Reputation:
I found way to configure AWS credentials by
aws configure
command. But this is not very comfortable for me since I'm using multiple AWS accounts. Is there any way to make it easy to configure AWS credentials and switch between them?
Upvotes: 2
Views: 5896
Reputation: 269091
Yes. You can configure multiple profiles.
The easiest way is to use:
aws configure --profile <name>
You can then use it with:
aws s3 ls --profile <name>
If --profile
is not specified, it will use the default
profile.
All configuration information is stored in the ~/.aws/credentials
and ~/.aws/config
files.
See: Named profiles - AWS Command Line Interface
Upvotes: 5