AWS Default region not setting using env variable in boto
<p>Python terminal below</p>

<pre><code>In [3]: os.environ['AWS_DEFAULT_REGION']
Out[3]: 'us-west-2'

In [4]: import boto

In [5]: boto.connect_ec2()
Out[5]: EC2Connection:ec2.ap-southeast-1.amazonaws.com
</code></pre>

<p>AWS Default region is not getting set even after using <code>AWS_DEFAULT_REGION</code> as env variable. Please suggest !</p>

<p><strong>Solution:</strong> </p>

<p><code>AWS_DEFAULT_REGION</code> works only with <code>boto3</code>.
I was using <code>boto2</code>. Environment variables for region is not supported in <code>boto2</code>.</p>

<p>Updating the <code>boto.cfg</code> fixed the <code>problem</code>.</p>

python amazon-web-services boto