Lambda GPU Instances on Managed Instances: Limits, Pricing and Setup

2026-11-25来源 dev.toEnglish

Lambda has been CPU-only for its whole life. As of 18 November you can attach a GPU, as long as you run your functions on Lambda Managed Instances (LMI). I've read the launch post closely, and here's what it says, what it costs, and what I'd check before moving anything to it.

What launched

GPU support for Event Functions on Lambda Managed Instances is generally available. Functions are deployed as container images, and AWS describes the feature as tuned for inference rather than training.

Supported instance families at launch: G4dn, G5, G6, G6f, Gr6, Gr6f and G6e. The post says more are coming.

Limits as stated in the post:

  • Container image up to 32 GB (10 GB per file)
  • Ephemeral storage up to 32 GB
  • Memory from 2,048 to 32,768 MB
  • Accelerator memory from 3 to 48 GB
  • Up to 48 concurrent requests per execution environment
  • Up to 15,000 vCPUs per capacity provider
  • Timeout up to 90 minutes for async and event source mapping invocations

That 90-minute timeout matters. It makes batch-style inference (embedding a backlog, transcribing audio, scoring a queue) a realistic Lambda workload for the first time.

What it costs

There are three parts:

  1. The normal EC2 price for the instance (Savings Plans and Reserved Instances apply)
  2. A 9.75 percent management fee on top for GPU instances
  3. The usual Lambda request fee, $0.20 per million requests

So this is not pay-per-millisecond serverless. You are paying for instances that Lambda manages for you, plus a fee for the management. If your traffic is spiky and mostly idle, run the numbers against SageMaker endpoints or a plain ECS service on GPU before you get excited. The post does not state a regional price list, it points to the Lambda pricing page.

How you set it up

Going by the post, the flow is:

  1. Request a quota increase for "Running On-Demand G and VT instances". New accounts may start at 0, so do this first.
  2. Create a capacity provider with aws lambda create-capacity-provider, using a JSON file with AllowedInstanceTypes (the example lists g5.2xlarge, g6.2xlarge and g6e.2xlarge) and a MaxVCpuCount (96 in the example).
  3. Build an image. AWS ships curated bases: base:cuda, cupy:cuda, pytorch:cuda, vllm:cuda and sglang:cuda. The example uses FROM public.ecr.aws/lambda/deep-learning-containers/vllm:cuda-v1 and sets the model through a MODEL_ID environment variable.
  4. Create the function with PackageType set to Image, an AcceleratorConfig (the example uses AcceleratorMemorySize 16) and a CapacityProviderConfig.
  5. Publish with --publish-to LATEST_PUBLISHED and invoke function-name:$LATEST.PUBLISHED, with an OpenAI-style payload in the example.

I have not run any of this. These steps come from the launch post.

What I'd check first

  • Cold starts with big images. The post says SOCI lazy loading cuts startup by up to 70 percent. That is a ceiling, not a promise, so time your own model.
  • Concurrency per environment. The example defaults to 4 concurrent requests per execution environment, and the maximum is 48. Tune this against GPU memory, not guesswork.
  • Region availability. The post does not list Regions. The walkthrough uses us-east-2.
  • Idle cost. Work out whether your capacity provider scales down the way you assume. The post does not spell out the scaling behaviour in the part I read.

My view: this is a good fit for event-driven, bursty-but-not-tiny inference where you already live in Lambda tooling. For steady low-latency serving, I'd still price a dedicated service first.

What's the first GPU workload you'd try on it?

Sources

Drafted with AI assistance. I review and edit every post.

原文:https://www.a8q9.cn/en/article/lambda-gpu-instances-on-managed-instances-limits-pricing-and-setup-ed71b4.html

相关文章