Commit 20f06990 authored by nimrod's avatar nimrod
Browse files

Corrected deduction of AWS region.

parent 8ad408d5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -194,7 +194,8 @@ deduce_aws_region () {
    AWS_DEFAULT_REGION="$(python3 << EOF
from urllib.request import urlopen
import json
print(json.load(urlopen('http://169.254.169.254/latest/dynamic/instance-identity/document'))['region'])
response = urlopen('http://169.254.169.254/latest/dynamic/instance-identity/document')
print(json.loads(response.read().decode('utf-8'))['region'])
EOF
    )"
    export AWS_DEFAULT_REGION