See cloud-config.
sudo cloud-init query userdata sudo cloud-init query region sudo cloud-init query availability_zone sudo cloud-init query -l