1 # configure environment with AWS info
2 export INSTANCE_ID
=`curl -sf http://169.254.169.254/latest/meta-data/instance-id`
3 if ! export PUBLIC_HOSTNAME
=`curl -sf http://169.254.169.254/latest/meta-data/public-hostname`
5 export PUBLIC_HOSTNAME
=''
7 if ! export PUBLIC_IP
=`curl -sf http://169.254.169.254/latest/meta-data/public-ipv4`
11 export PRIVATE_IP
=`curl -sf http://169.254.169.254/latest/meta-data/local-ipv4`
12 export EC2_AZ
=`curl -sf http://169.254.169.254/latest/meta-data/placement/availability-zone/`
14 export EC2_REGION
="${EC2_AZ:0:$TMP-1}"
16 # export CLOUD_ACCOUNT=awsAcctName...
17 # export CLOUD_MODULE=mytags['tags']['module']|default('(no module)')
18 # export CLOUD_STACK=stack|None
19 # export CLOUD_PHASE=mytags['tags']['phase']|default('None')
21 # export CLOUD_AUTO_SCALE_GROUP=
22 # export CLOUD_LAUNCH_CONFIG=module-stack-country-phase-version