4

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?

Ganesh
  • 144
  • 1
  • 5

2 Answers2

4

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.

Hussain Mansoor
  • 2,934
  • 2
  • 27
  • 40
  • 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? – Ganesh May 16 '21 at 14:55
  • Yes your understanding is correct. We can't know which AZ the execution is running on. – Hussain Mansoor May 18 '21 at 02:09
1

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

enter image description here

Chuong Nguyen
  • 1,077
  • 6
  • 15