Hey fellow web developers and tech enthusiasts, if you're using or planning to use AWS Lambda Managed Instances (LMI), there's a crucial detail about scaling settings you absolutely need to know: setting MinExecutionEnvironments and MaxExecutionEnvironments to 0/0 does not mean «scale up from zero on the next request.» Instead, it means «deactivate the Lambda function entirely.» This is a significant departure from standard Lambda behavior, and misunderstanding it will lead to immediate and frustrating failures for your functions.

So, what exactly are Lambda Managed Instances? Simply put, they allow you to run your Lambda functions on EC2 capacity that you control, while still enjoying Lambda's familiar programming model. Much of the recent buzz has focused on the removal of the memory ceiling and the new EC2-backed pricing model, which lets you apply Savings Plans and Reserved Instances. However, very little coverage has actually focused on the scaling configuration—specifically, what happens when both MinExecutionEnvironments and MaxExecutionEnvironments are set to zero.

The common assumption most engineers carry over from standard Lambda is that a minimum of zero means «no standing capacity, scale up from zero on the next request.» But for LMI, this assumption is completely wrong. When both the minimum and maximum execution environments are set to zero, Lambda doesn't just idle the function or wait for the next invocation. Instead, it deactivates the function version completely. This means every EC2 Managed Instance backing that version is terminated, and instance charges continue until termination is truly complete.

When a function version is deactivated, its State flips to «Deactivated.» Any invocation against a deactivated version will return an explicit, outright error. There's no cold start, no queuing, and no retries—it fails immediately. Crucially, reactivation is never automatic. You have to manually push a new scaling configuration with non-zero values, whether through the console, the PutFunctionScalingConfig API, or a scheduled action. This is the opposite of how setting ReservedConcurrentExecutions=0 behaves in standard Lambda, where new invocations are throttled but the function remains active. So, pay close attention to these details when working with Lambda Managed Instances!