TalksAWS re:Invent 2025 - Lambda Managed Instances: EC2 Power with Serverless Simplicity (CNS382)

AWS re:Invent 2025 - Lambda Managed Instances: EC2 Power with Serverless Simplicity (CNS382)

AWS re:Invent 2025 - Lambda Managed Instances: EC2 Power with Serverless Simplicity

Overview

  • AWS has pioneered serverless computing with AWS Lambda, continuously innovating and expanding the capabilities over the past 10 years.
  • Customers have widely adopted serverless to run modern applications, benefiting from the programming model, scalability, and cost-efficiency.
  • However, some use cases still require more control over the underlying compute infrastructure, leading to architectural shifts and increased operational overhead.
  • Lambda Managed Instances (LMI) is a new solution that provides the same serverless programming model with more control over the compute resources.

Lambda Managed Instances (LMI)

  • LMI allows you to run AWS Lambda functions on EC2 instances of your choice within your own AWS account.
  • Key features:
    • Access to over 400 different EC2 instance types across general-purpose, compute-optimized, and memory-optimized families
    • AWS handles the lifecycle management, OS patching, and other operational tasks for the EC2 instances
    • Ability to apply EC2 pricing constructs like Savings Plans, Reserved Instances, and custom agreements
    • Support for multi-concurrency invocations on the EC2 instances

Using LMI

  1. Create a Capacity Provider:
    • Defines the VPC configuration, allowed instance types, and scaling settings for the EC2 instances
    • Provides an IAM role for Lambda to manage the instances in your account
  2. Create a Function:
    • Associate the function with the Capacity Provider to designate it as an LMI function
    • Supports the same packaging formats, runtimes, and features as Lambda default
    • Configure the function memory size and CPU ratio
  3. Publish a Function Version:
    • Triggers the deployment of the function on the EC2 instances within the Capacity Provider
    • Lambda will launch the instances, initialize the execution environments, and make the function available for invocation

Differences from Lambda Default

  1. Concurrency:
    • LMI supports multi-concurrency, allowing multiple invocations to execute simultaneously within a single execution environment
    • Requires consideration of thread safety best practices
  2. Scaling:
    • LMI uses asynchronous, resource-based scaling, monitoring CPU and memory utilization to scale instances and execution environments
    • No cold starts, as execution environments are pre-initialized
  3. Security Boundary:
    • LMI functions run in your own AWS account, providing a single-tenant environment
    • VM-level isolation can be achieved by using separate Capacity Providers

Partner Integrations and Tooling

  • DataDog provides observability and monitoring for LMI instances
  • Sedimentation's Autonomous Optimization platform helps migrate and optimize LMI deployments
  • AWS AppConfig, CloudWatch Lambda Insights, and AWS Serverless Application Model (SAM) support LMI
  • Pricing includes EC2 instance costs plus a 15% management fee

Key Takeaways

  • LMI is not a replacement for Lambda default, but rather a complementary offering for specific use cases:
    • High-traffic, steady-state workloads with predictable traffic patterns
    • Applications with specialized compute, memory, or network requirements
  • LMI provides the same serverless programming model with more control over the underlying compute infrastructure and the ability to leverage EC2 pricing constructs.
  • The multi-concurrency, asynchronous scaling, and single-tenant security model of LMI differentiate it from the Lambda default experience.
  • LMI is supported by a growing ecosystem of observability, migration, and automation tools, making it a viable option for enterprises looking to optimize their serverless deployments.

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.