Reputation: 71
I am using AWS CLI to setup ECS clusters in different regions,so how can i configure AWS CLI on an instance for two different regions.
Upvotes: 2
Views: 6925
Reputation: 8455
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.
Upvotes: 8