As we know there are multiple AZ in an Region, is it possible to deploy/create Lambda function in particular AZ of the region or Lambda function is created randomly in any AZ of particular Region?
Is it possible to configure the Availability Zone(AZ) for Lambda function in AWS?
Asked Answered
There are 2 types of Lambda in general. VPC and Non-VPC. So if there's a VPC then there are Subnets and each Subnet is in a specific AZ. If you only have 1 subnet in a VPC or you configure your lambda to run in one specific subnet then yes you can configure Lambda to run in specific AZ.
But there's no guarantee the that region-1a is same AZ for all the accounts. So region-1a AZ for AWS Account1 might be different for AWS Account2.
For managed services like Lambda, one should not consider AZs in designing the solution.
its not design requirement, I was just understanding the concepts and got this doubt. So in case of Non VPC Lambda, it will be running(when triggered) on any AZ based on the availability underlying hardware? –
Towrope
Yes your understanding is correct. We can't know which AZ the execution is running on. –
Vivienviviene
Lambda functions are deployed to specified subnets in VPC.
You can select which subnet of which AZ you want to deploy in.
Something like this
yes but what if you have 3 public subents for your lambda, one in each a-z. The lambda is deployed via serverless and you have no clue in which zone your lambda is deployed/executed –
Micromho
© 2022 - 2024 — McMap. All rights reserved.