是否有 EC2_*
环境变量来指定 EC2 命令行工具的默认区域,以避免指定 --region eu-west-1
选项每个命令?
最佳答案
对于最新的 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
关于amazon-ec2 - 可以使用变量指定 EC2 命令行工具的默认区域吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19368427/