AWS Certified Solutions Architect - Associate
is_emr_master () {
[[ "$(jq -r .isMaster /var/lib/info/instance.json)" == "true" ]]
}
aws_user_data () {
curl -sSL "http://169.254.169.254/latest/user-data/$*"
}
aws_meta_data () {
curl -sSL "http://169.254.169.254/latest/meta-data/$*"
}
aws_region () {
declare az=""; az="$(aws_meta_data placement/availability-zone)"
echo "${az%[a-z]}"
}