By default, AWS CLI tool will create a profile called default when you first run the configure option. The same profile will also be used when you run any AWS CLI tools.
You can configure multiple profiles or accounts for AWS CLI. AWS calls this named profile, and you can then switch to any of the profiles or accounts when running the aws commands.
Related: How to configure AWS CLI tool
Related: How to switch profiles on AWS CLI
$ aws configure --profile second_user
AWS Access Key ID [None]: AKIAJF4JT25ZZYGCTTVA
AWS Secret Access Key [None]: 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
Default region name [None]:
Default output format [None]:
$ cat .aws/credentials [default] aws_access_key_id = AKIAIPXU35JJQNVVMDOQ aws_secret_access_key = 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 [second_user] aws_access_key_id = AKIAJF4JT25ZZYGCTTVA aws_secret_access_key = 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
Comment anonymously. Login not required.