AWS Lambda now provides Availability Zone (AZ) metadata through a new metadata endpoint in the Lambda execution environment. With this capability, developers can determine the AZ ID (e.g., use1-az1) of the AZ their Lambda function is running in, enabling them to build functions that make AZ-aware routing decisions, such as preferring same-AZ endpoints for downstream services to reduce cross-AZ latency. This capability also enables operators to implement AZ-aware resilience patterns like AZ-specific fault injection testing.
Lambda automatically provisions and maintains execution environments ready to serve function invocations across multiple AZs within an AWS Region to provide high availability and fault tolerance without any additional configuration or management overhead for customers. As development teams scale their serverless applications, their functions often need to interact with other AWS services like Amazon ElastiCache and Amazon RDS that provide endpoints specific to each AZ. Until now, Lambda did not provide a way for functions to determine which AZ they were running in. With the new metadata endpoint, functions can now retrieve their AZ ID with a simple HTTP request, making it easy to implement AZ-aware logic without building and maintaining custom solutions.
To get started, use the Powertools for AWS Lambda metadata utility or call the metadata endpoint directly using the environment variables that Lambda automatically sets in the execution environment. This capability is supported for all Lambda runtimes, including custom runtimes and functions packaged as container images, and integrates seamlessly with Lambda capabilities like SnapStart and provisioned concurrency, regardless of whether your functions are VPC-enabled.
AZ metadata support is available at no additional cost in all commercial AWS Regions where Lambda is available. To learn more, visit Lambda documentation.
Categories: marketing:marchitecture/serverless,marketing:marchitecture/compute,general:products/aws-lambda
Source: Amazon Web Services
Latest Posts
- Microsoft Teams: Recently used emojis sync across devices [MC1256307]
![Microsoft Teams: Recently used emojis sync across devices [MC1256307] 2 pexels brett sayles 2881229](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Copilot Studio – Read only Analytics Viewer role [MC1255508]
![Microsoft Copilot Studio - Read only Analytics Viewer role [MC1255508] 3 pexels pixabay 163036](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- (Updated) Microsoft 365 Copilot: Introducing infinite scroll for chat history [MC1237701]
![(Updated) Microsoft 365 Copilot: Introducing infinite scroll for chat history [MC1237701] 4 pexels felixmittermeier 957090](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Teams for Mac: Improved access to account management [MC1256301]
![Microsoft Teams for Mac: Improved access to account management [MC1256301] 5 pexels karolina grabowska 4199098](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![Microsoft Teams: Recently used emojis sync across devices [MC1256307] 2 pexels brett sayles 2881229](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-brett-sayles-2881229-150x150.webp)
![Microsoft Copilot Studio - Read only Analytics Viewer role [MC1255508] 3 pexels pixabay 163036](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-163036-150x150.webp)
![(Updated) Microsoft 365 Copilot: Introducing infinite scroll for chat history [MC1237701] 4 pexels felixmittermeier 957090](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-felixmittermeier-957090-150x150.webp)
![Microsoft Teams for Mac: Improved access to account management [MC1256301] 5 pexels karolina grabowska 4199098](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-karolina-grabowska-4199098-150x150.webp)
