Use case
Lambda has recently launched a metadata device similar to to the Instance Metadata Service that EC2 has. We should add a utility that allows user to access the data without having explicitly make fetch requests to the IP address where the service lives.
Solution/User Experience
using AWS.Lambda.Powertools.Metadata;
public class Function
{
public string Handler(object input, ILambdaContext context)
{
var azId = LambdaMetadata.AvailabilityZoneId;
return $"Running in AZ: {azId}";
}
}
Alternative solutions
Acknowledgment
Use case
Lambda has recently launched a metadata device similar to to the Instance Metadata Service that EC2 has. We should add a utility that allows user to access the data without having explicitly make fetch requests to the IP address where the service lives.
Solution/User Experience
Alternative solutions
Acknowledgment