At the AWS re:Invent conference in Las Vegas this week, the cloud giant has introduced Lambda managed instances, which blend the serverless model of Lambda functions with the ability to rent specific VM (virtual machine) instances.

Lambda is popular with developers for its ability to run functions on demand, with no need to manage servers and scaling to zero when not in use; but if used intensively it is expensive in comparison to running the same functions on EC2. Other issues with Lambda are cold start latency (unless paying extra for provisioned concurrency, which keeps functions permanently initialized) and lack of control over the hardware used other than the architecture (x86 or ARM) and the amount of memory.

Lambda managed instances are a new way to provision serverless functions, where the user can specify the exact EC2 instance type used and get discounted prices in return for commitments using compute savings plans or reserved instances. Each instance can handle multiple concurrent requests. These instances are only used for Lambda, and are managed automatically with operating system updates, load balancing, and a maximum lifetime of 14 days. Users define what AWS calls a capacity provider to specify the managed instances and how they should scale, with the initial default being three execution environments across availability zones for resiliency, scaled up automatically based on CPU resource consumption. The concurrency – meaning the number of functions invocations that run simultaneously – can be set to a maximum of 64 per vCPU (virtual CPU).