samedi 12 avril 2014

Amazon web services - AWS Auto scaling outils CLI a plusieurs façons pour la région de réglage dans les variables d'environnement - Stack Overflow


In the AWS documents, there seems to be 2 ways to set the region on Linux systems in the environment for the Autoscaling command line tools. For example, to set the AS tools to hit the Singapore region you can do this:


export AWS_AUTO_SCALING_URL=https://autoscaling.ap-southeast-1.amazonaws.com

But this method seems to work as well:


export EC2_REGION=ap-southeast-1

However, in with the EC2 command line tools (not the autoscaling tools) the second method above does nothing, only the following works:


export EC2_URL=https://ec2.ap-southeast-1.amazonaws.com

So, which of the first two is correct? Is the second method for setting region in the Autoscale tools deprecated as it's not apparently used with the EC2 cli tools?




The AWS CLI tools for various services are inconsistent and are frequently missing newer features. I would encourage you to use the AWS CLI unified tool which provides a consistent experience among most AWS services.


Using your question about regions as an example, with the CLI tool you would either



  • Set the AWS_DEFAULT_REGION env var

  • Set region in the config file

  • Use --region as a command line arguments


This stays the same no matter which service (EC2, Autoscaling, ELB, etc) you're interacting with.


Hope this helps.



In the AWS documents, there seems to be 2 ways to set the region on Linux systems in the environment for the Autoscaling command line tools. For example, to set the AS tools to hit the Singapore region you can do this:


export AWS_AUTO_SCALING_URL=https://autoscaling.ap-southeast-1.amazonaws.com

But this method seems to work as well:


export EC2_REGION=ap-southeast-1

However, in with the EC2 command line tools (not the autoscaling tools) the second method above does nothing, only the following works:


export EC2_URL=https://ec2.ap-southeast-1.amazonaws.com

So, which of the first two is correct? Is the second method for setting region in the Autoscale tools deprecated as it's not apparently used with the EC2 cli tools?



The AWS CLI tools for various services are inconsistent and are frequently missing newer features. I would encourage you to use the AWS CLI unified tool which provides a consistent experience among most AWS services.


Using your question about regions as an example, with the CLI tool you would either



  • Set the AWS_DEFAULT_REGION env var

  • Set region in the config file

  • Use --region as a command line arguments


This stays the same no matter which service (EC2, Autoscaling, ELB, etc) you're interacting with.


Hope this helps.


0 commentaires:

Enregistrer un commentaire