I am having an AWS lambda function with Java8 as programming language which needs access to AWS VPC resources and my VPC has multiple AZ (Availability Zones) under it.
When I know the Availability Zone details where my lambda function is currently running (want to figure out this within the lambda function itself using Context Object or from Environment Variables), I can connect to the resources in the local AZ first and do fail over to other AZ if needed. This avoids data transfer between the AZ most of the time.
Is there any way to get the AZ details from within the lambda code itself ?