Skip to content
Snippets Groups Projects
Commit a0fb3c8f authored by nimrod's avatar nimrod
Browse files

Corrected deduction of AWS region.

parent 5a0f8fb9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment