简体   繁体   中英

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

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?

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM