简体   繁体   English

如何从 .aws/credentials 为 aws cli 获取 AWS 凭证配置文件

[英]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.我的.aws/credentials文件中有以下 AWS 编程访问凭证。

how to specify which credentials to use for AWS cli commands?如何指定用于 AWS cli 命令的凭证? 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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