I need to do something like...
"echo --zones ",
{
"Ref": "az_of_subnet"
},
" >> aws_details.txt\n"
in the user-data of an EC2 instance which is being created through the cloudformation script. The Subnet ID of an EXISTING subnet is known. Is there a way to get the availability zone of the subnet? Currently I'm taking this as an input (az_of_subnet) from the user, which seems redundant/not right, since I already know the subnet-id.