How to source AWS credentials profile from .aws/credentials for aws cli

Viewed 62

I have the following programmatic access credentials for AWS in my .aws/credentials file.

how to specify which credentials to use for AWS cli commands? and verify which credentials are being used?

enter image description here

1 Answers

To verify:

AWS_PROFILE=amplify aws sts get-caller-identity

# OR

aws sts get-caller-identity --profile amplify

The same to run commands:

AWS_PROFILE=default aws eks --region .......

# OR

aws eks --region ....... --profile default
Related