If a Lambda function is deployed in multiple subnets, how does it decide which subnet to run in when it is invoked? Is it just random?
I don't think AWS makes this aspect of lambda invoke behavior public, but this answer aligns with my experience - the lambda will be invoked in a random subnet from the defined subnet_ids:
What triggers ENIs to be created for AWS Lambdas accessing VPC resources