Know How Guide and Hands on Guide for AWS
AWS Health is a RESTful web service that uses HTTPS to retrive data as JSON. Your application code can make requests directly to the AWS Health API.
When you use the REST API directly, you must write the necessary code to sign and authenticate your requests.
The AWS Health API follows a multi-Region application architecture and has two regional endpoints in an active-passive configuration. To support active-passive DNS failover, AWS Health provides a single, global endpoint. You can determine the active endpoint and corresponding signing Region by performing a DNS lookup on the global endpoint.
# Global region
dig global.health.amazonaws.com | grep CNAME
# China region
dig global.health.amazonaws.com.cn | grep CNAME
git clone https://github.com/aws/aws-health-tools.git
cd aws-health-tools/high-availability-endpoint/python
pip3 install virtualenv
virtualenv -p python3 v-aws-health-env
python3 -m venv v-aws-health-env
source v-aws-health-env/bin/activate
pip3 install -r requirements.txt
aws sts get-session-token \
--duration-seconds 900
export AWS_ACCESS_KEY_ID="Copy Paste AccessKeyId"
export AWS_SECRET_ACCESS_KEY="Copy Paste SecretAccessKey"
export AWS_SESSION_TOKEN="Copy Paste SessionToken"
# Modify the /aws-health-tools/high-availability-endpoint/python/region_lookup.py
qname = 'global.health.amazonaws.com.cn'
python3 main.py
deactivate
python3 health-demo.py