3

是否有EC2_*环境变量来指定 EC2 命令行工具的默认区域以避免--region eu-west-1为每个命令指定选项?

4

1 回答 1

10

对于最新的 AWS CLI:

export AWS_DEFAULT_REGION=eu-west-1

参考:

http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

对于较旧的 EC2 CLI:

export EC2_URL=https://ec2.eu-west-1.amazonaws.com

参考:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html

http://docs.aws.amazon.com/general/latest/gr/rande.html

于 2013-10-15T05:21:10.170 回答