我正在使用AWS CLI在不同区域中设置ECS集群,因此如何在两个不同区域的实例上配置AWS CLI。
You can simply specify the region the AWS CLI should operate on. Either use the command line parameter --region
, like:
aws --region us-east-1 ecs ...
And alternative is to use the environment variable AWS_DEFAULT_REGION
, like:
AWS_DEFAULT_REGION=us-east-1 aws ecs ...
A third option would be to configure multiple profiles for the AWS CLI in ~/.aws/config
and set a different region for each profile.
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.