AWS Lambda GPU Support: Setup, Pricing and the Always-On Catch

Logeshwaran
—

AWS Lambda can now run functions on GPUs, through Lambda Managed Instances and EC2 G-series instances; this guide shows how it works, how to deploy a model in about ten minutes, what it really costs, and the always-on catch that surprises people.

⚡ Quick Answer

• New (November 18, 2026): Lambda Event Functions can run on G4dn, G5, G6, G6f, Gr6, Gr6f and G6e GPU instances, packaged as container images. No drivers, CUDA or AMIs to manage.

• Price: EC2 instance price + 9.75% management fee + $0.20 per million requests. No per-millisecond duration charge.

• The catch: it doesn’t scale to zero by default. Three GPU instances (one per Availability Zone) run around the clock unless you lower the minimum.

• First step: request EC2 quota for Running On-Demand G and VT instances; it can start at 0.

• Best for: custom model inference, media processing, rendering, triggered by S3, SQS, API Gateway or EventBridge.

Jump to: Basics · Cost · Deploy a model · Limits · Real tests · FAQ

Here’s what “serverless GPU” doesn’t mean here: pay only when it runs. Lambda GPU bills for the EC2 instances behind your function for as long as they’re up, and by default Lambda keeps three execution environments, one per Availability Zone, each on its own GPU instance. On g6.2xlarge that’s about $2,350 a month before a single request. Set the minimum to one for testing and it’s about $783, still around the clock.

Jake wanted the shop to sort product photos automatically with a small vision model, and he’d read that Lambda “has GPUs now”.

Jake: "Serverless GPU! So we only pay when someone uploads a photo, right?"

Ethan: "Not quite. Lambda runs the GPU servers for us, but they stay on, and we pay for them by the hour. Let’s work out whether that beats the alternatives."

New to this? The plain-English version

  • AWS Lambda runs your code without you managing servers. Classic Lambda functions run on a shared pool, start in milliseconds and bill per millisecond, but have never had GPUs.
  • Lambda Managed Instances is a second way to run Lambda functions: on EC2 instances that Lambda launches, patches and scales for you in your account, billed at EC2 prices plus a management fee. It suits steady traffic.
  • GPU support adds EC2 G-series instances to Managed Instances, so a function can use an NVIDIA GPU for AI inference, video, rendering or number crunching.
  • A capacity provider tells Lambda which instance types it may use, in which VPC subnets, and how far it may scale.
  • Container images: GPU functions are packaged as container images (up to 32 GB), not zip files. AWS provides ready-made base images with CUDA, PyTorch, vLLM and more (see Amazon ECR for where images live).
  • You still write and deploy “a Lambda function”, and the same 200-plus event sources can trigger it.

The jargon, decoded

TermMeaning
Execution environmentOne running copy of your function, with its own share of an instance and, here, a GPU
Capacity providerThe settings that tell Lambda which EC2 instance types, subnets and scaling limits to use
Accelerator memoryGPU memory; you set the minimum your function needs
OCI imageA standard container image, built with Docker or similar tools
vLLM / SGLangPopular open-source servers that run language models efficiently on GPUs
SOCISeekable OCI: starts a container before the whole image has downloaded

Which GPUs you get

Instance familyNVIDIA GPUNotes
G4dnT4Oldest and cheapest full GPU
G5A10GCommon for mid-size inference
G6, Gr6L4Efficient inference; Gr6 has more memory per vCPU
G6eL40SMost GPU memory on the list (48 GB)
G6f, Gr6fA fraction of an L4Smallest and cheapest; for light models

You don’t pick one GPU per function directly. You set the minimum GPU memory the function needs (3 to 48 GB), list allowed instance types in the capacity provider, and Lambda places the function on the smallest available GPU that fits, falling back across your list when capacity is tight. P-family, G7, Inferentia, Trainium and Graviton-based g5g instances aren’t accepted.

How it works under the hood

  1. You create a capacity provider listing allowed GPU instance types, VPC subnets and a vCPU ceiling.
  2. You create a function from a container image and attach it to the capacity provider, with a minimum GPU memory.
  3. You publish a version. Lambda launches instances, places execution environments on the smallest GPU that fits, pulls the image and loads the model. The version becomes Active only when it’s ready to serve; an unpublished function reports ActiveNonInvocable.
  4. Requests arrive from any trigger. Several requests can share one environment and one copy of the model in GPU memory, up to your per-environment concurrency.
  5. Lambda scales on GPU utilization, CPU utilization and concurrency, adding instances (tens of seconds each, plus model loading) up to your vCPU ceiling.
  6. Versions are immutable. A new model or setting means a new published version; old and new can run side by side.

Compare that with classic Lambda: there, a request can start a fresh environment on a huge shared pool in milliseconds, and you pay nothing when idle. GPU functions trade that instant, pay-per-use model for dedicated hardware you keep warm.

Which models fit which GPU?

Weights take roughly parameters × bytes per parameter (2 bytes at 16-bit, 1 at 8-bit, about half a byte at 4-bit), plus room for the KV cache and the runtime. Rough guide:

Model (weights only)16-bit8-bit4-bitComfortable GPU
1.5 billion parameters3 GB1.5 GB~0.8 GBG6f (fractional L4) or T4
8 billion16 GB8 GB~4 GBL4 or A10G (24 GB) at 8-bit or 4-bit
14 billion28 GB14 GB~7 GBL4 or A10G at 4-bit or 8-bit; L40S at 16-bit
32 billion64 GB32 GB~16 GBL40S (48 GB) at 8-bit; L4 or A10G only at 4-bit
70 billion140 GB70 GB~35 GBL40S at 4-bit, with little room to spare

Bigger than that and you’re past what Lambda GPU offers (48 GB at most); that’s Bedrock or larger EC2 instances. Many concurrent users need extra memory for the KV cache, so leave headroom.

What it really costs

The bill has three parts: the EC2 On-Demand price of the instances, a 9.75% management fee on GPU instances (lower than the 15% Lambda Managed Instances charges on CPU types), and the usual $0.20 per million requests. There’s no per-millisecond duration charge: you pay for instances while they run, busy or idle.

InstanceEC2 price per hourWith 9.75% fee1 environment, per month3 environments (default), per month
g6f.large (part of an L4)$0.2020$0.2217$161.84$485.51
g4dn.xlarge (T4)$0.5260$0.5773$421.42$1,264.25
g6.xlarge (L4)$0.8048$0.8833$644.79$1,934.36
g6.2xlarge (L4)$0.9776$1.0729$783.23$2,349.69
g5.xlarge (A10G)$1.0060$1.1041$805.98$2,417.95
g6e.xlarge (L40S)$1.8610$2.0424$1,490.99$4,472.96

US East (N. Virginia) On-Demand Linux prices, December 3, 2026, for 730 hours a month. Savings Plans and Reserved Instances apply to the instance part, and if you create an EC2 On-Demand Capacity Reservation that matches your capacity provider, Lambda uses it automatically (see Savings Plans vs Reserved vs Spot).

Three ways to run the same function

PatternSetupMonthly cost (g6.2xlarge)
Always on, default settings3 environments, 24/7$2,349.69
Always on, one environment1 environment, 24/7 (no zone redundancy)$783.23
Batch day1 environment for one 24-hour batch a month, then delete$25.75 + requests
Small model on a fractional GPU1 × g6f.large for that same day$5.32 + requests

The pattern, not the instance price, decides the bill. If work can wait and be batched, publish, process and tear down. If users expect answers within seconds at any hour, you’re paying for warm GPUs, and the question becomes how busy you can keep them.

Lambda GPU vs running the instance yourself

On the same g6.2xlarge, the management fee adds about $0.095 an hour, roughly $70 a month per instance. For that you skip installing drivers and CUDA, patching the OS, writing scaling logic, building a load balancer and wiring up event sources. For one small team, that’s usually cheap. For a large, steady fleet run by a platform team that already does all that, plain EC2 or containers can win.

Lambda GPU vs Bedrock

If a model on Amazon Bedrock does the job, Bedrock is far cheaper at low volume: you pay per token and nothing while idle (Bedrock pricing). Lambda GPU makes sense for your own fine-tuned or custom models, open models Bedrock doesn’t host, steady high volume where a busy GPU beats per-token pricing, and non-AI GPU work.

Jake: "So for sorting a few hundred photos a day?"

Ethan: "A tiny model on Bedrock, or batch them once a night. A GPU on all day for a few hundred photos is like hiring a van to post a letter."

Deploy an open model in about ten minutes

This follows AWS’s own walkthrough, which served a small open model (Qwen2.5-1.5B-Instruct) with no inference code at all.

Step 0: get GPU quota

In Service Quotas → Amazon EC2, request an increase for Running On-Demand G and VT instances in your Region. It can start at 0 in new accounts. Size it for your minimum environments: three g6.2xlarge environments need 3 × 8 = 24 vCPUs, plus headroom for scaling and for republishing (see the tip below). More in our vCPU quota guide.

Step 1: create a capacity provider

{
  "CapacityProviderName": "lmi-gpu-cp",
  "VpcConfig": {
    "SubnetIds": ["subnet-aaaa", "subnet-bbbb", "subnet-cccc"],
    "SecurityGroupIds": ["sg-aaaa"]
  },
  "PermissionsConfig": {
    "CapacityProviderOperatorRoleArn": "arn:aws:iam::111122223333:role/lmi-operator-role"
  },
  "InstanceRequirements": {
    "AllowedInstanceTypes": ["g5.2xlarge", "g6.2xlarge", "g6e.2xlarge"]
  },
  "CapacityProviderScalingConfig": { "ScalingMode": "Auto", "MaxVCpuCount": 96 }
}

💻 Where to run these commands

Easiest: AWS CloudShell, nothing to install. Sign in to the AWS Management Console, choose your Region at the top right, then click the CloudShell icon (a small >_ terminal symbol) in the top bar, or type CloudShell in the search box and open it. When the $ prompt appears, paste a command and press Enter. CloudShell already has the AWS CLI, uses your console permissions and costs nothing extra.

On your own computer: install AWS CLI version 2 (installers for Windows, macOS and Linux are on the AWS CLI page), run aws configure once (or aws configure sso if your company signs in through single sign-on), and check it works with aws sts get-caller-identity. Then paste commands into Terminal on Mac or Linux, or PowerShell or Command Prompt on Windows.

Windows tip: a line ending in a backslash ( \ ) continues on the next line in CloudShell, Mac and Linux. In PowerShell use a backtick ( ` ) instead, in Command Prompt a caret ( ^ ), or simply join the lines into one. JSON inside single quotes works as shown in CloudShell; on Windows, save the JSON in a file and pass it as file://name.json.

Replace example values such as my-bucket, my-function, 111122223333 (an account ID) and us-east-1 with your own.

aws lambda create-capacity-provider --region us-east-2 \
  --cli-input-json file://capacity-provider.json

Listing several instance types lets Lambda pick the cheapest available one and fall back when a type is short (InsufficientInstanceCapacity explained). MaxVCpuCount caps how far it can scale, and your bill.

Step 2: build the image

With AWS’s vLLM base image, the whole Dockerfile is one line, and the model is chosen by an environment variable:

FROM public.ecr.aws/lambda/deep-learning-containers/vllm:cuda-v1
# push a single-platform image; Lambda rejects OCI image indexes with attestations
docker buildx build --platform linux/amd64 --provenance=false \
  -t 111122223333.dkr.ecr.us-east-2.amazonaws.com/lmi-gpu-inference:latest --push .

Other base images: base:cuda (CUDA toolkit), cupy:cuda (CuPy, NumPy, SciPy, Pandas, Numba), pytorch:cuda (PyTorch, torchvision, torchaudio, transformers, FFmpeg) and sglang:cuda. You can extend them or bring your own image.

Step 3: create the function

{
  "FunctionName": "lmi-gpu-inference",
  "PackageType": "Image",
  "Code": { "ImageUri": "111122223333.dkr.ecr.us-east-2.amazonaws.com/lmi-gpu-inference:latest" },
  "Role": "arn:aws:iam::111122223333:role/lmi-gpu-inference-execution-role",
  "Timeout": 900,
  "MemorySize": 16384,
  "EphemeralStorage": { "Size": 32768 },
  "Environment": { "Variables": { "MODEL_ID": "Qwen/Qwen2.5-1.5B-Instruct" } },
  "CapacityProviderConfig": {
    "LambdaManagedInstancesCapacityProviderConfig": {
      "CapacityProviderArn": "arn:aws:lambda:us-east-2:111122223333:capacity-provider:lmi-gpu-cp",
      "ExecutionEnvironmentMemoryGiBPerVCpu": 4,
      "PerExecutionEnvironmentMaxConcurrency": 4
    }
  },
  "AcceleratorConfig": { "AcceleratorMemorySize": 16 }
}
aws lambda create-function --region us-east-2 --cli-input-json file://function.json

MODEL_ID takes a Hugging Face or ModelScope repository, an S3 location or a local path; add HF_TOKEN for gated models. AcceleratorMemorySize is the minimum GPU memory in GB. PerExecutionEnvironmentMaxConcurrency sets how many requests share one GPU (default 4, up to 48).

Step 4: publish, then invoke

aws lambda publish-version --region us-east-2 \
  --function-name lmi-gpu-inference --publish-to LATEST_PUBLISHED

aws lambda invoke --region us-east-2 \
  --function-name 'lmi-gpu-inference:$LATEST.PUBLISHED' \
  --cli-binary-format raw-in-base64-out \
  --payload '{"messages": [{"role": "user", "content": "Explain serverless GPU inference in one sentence."}], "max_tokens": 128}' \
  /dev/stdout

Publishing starts the instances, pulls the image, loads the model and warms the engine, so the first caller doesn’t wait for a cold start. The payload is a standard OpenAI-style request, and the reply is an OpenAI-style completion, so OpenAI-compatible clients work with it. To switch models, change MODEL_ID and publish a new version; no rebuild needed.

Step 5: clean up

When you’re done testing, delete the function, then the capacity provider. Until you do, Lambda keeps the GPU instances running and you keep paying.

Ways to trigger GPU work

TriggerExampleWatch out for
S3 uploadClassify or tag every new product photo; transcode every new videoBursts of uploads queue up while instances scale
SQS queueProcess documents in batches overnightVisibility timeout of at least 6x the function timeout
API GatewayAn internal inference endpointAPI Gateway waits only 29-30 seconds (timeouts explained)
EventBridge scheduleA nightly render or reportPublish before the run, delete after, if it’s a batch
Durable functionsA multi-step pipeline with a GPU step in the middleCheckpoint around the GPU step
Another function or agentAn agent running in a MicroVM calls the GPU function for inferenceKeep the GPU step small and focused

Because it’s an ordinary Event Function, you get the same retries, dead-letter queues and IAM permissions as any other Lambda function, with no custom glue code.

Not just AI: other GPU jobs

  • Media processing and transcoding: video and image pipelines triggered on upload; the PyTorch base image includes FFmpeg.
  • 3D rendering and generative media: frame and asset rendering, diffusion and text-to-video (see our open AI video GPU requirements for what video models need).
  • Scientific computing and finance: simulations, matrix math and risk analysis with the CuPy image (CuPy, NumPy, SciPy, Pandas, Numba).
  • Long jobs: asynchronous and queue-triggered GPU functions can run up to 90 minutes each.

For these jobs the planning questions are the same as for AI: how long one job takes, how many can share a GPU, and whether the work can wait for a batch window. A render queue fed by SQS, with per-environment concurrency set to 1 so each job gets a whole GPU, is a simple, predictable setup; heavy jobs that saturate a GPU gain nothing from sharing it, while light ones do.

Production tips

  • Keep weights in S3: copy the model to an S3 bucket in the same Region, point MODEL_ID at it and set VLLM_LOAD_FORMAT=runai_streamer so weights stream straight into memory: faster starts, and no dependency on Hugging Face.
  • Leave headroom for republishing: a republish starts new environments before stopping the old ones. If the capacity provider is at its MaxVCpuCount, the update fails with “MinimumExecutionEnvironments can’t be provisioned because CapacityProvider has reached maxVCpuCount limit” and the old version keeps running.
  • Raise concurrency per GPU: one copy of the model can serve many requests at once; packing more requests per GPU is how you get your money’s worth.
  • Watch GPU metrics: GPU utilization, GPU memory utilization, GPU memory used and GPU power utilization appear in CloudWatch and the Lambda console. Low utilization means you’re paying for idle GPUs.
  • Lazy loading: Seekable OCI (SOCI) lets functions start before the whole image downloads, cutting environment start time by up to 70%.
  • Set a budget alert before the first publish (billing alerts).

Limits and what’s not supported

SettingLimit
Container imageUp to 32 GB (10 GB per file); container images only, no zip
Ephemeral storage (/tmp)Up to 32 GB, NVMe
Function memory2,048 to 32,768 MB
GPU (accelerator) memory3 to 48 GB
Concurrent requests per environmentUp to 48 (default 4)
vCPUs per capacity providerUp to 15,000
Timeout30 minutes synchronous; 90 minutes asynchronous and event source mappings
Instance familiesG4dn, G5, G6, G6f, Gr6, Gr6f, G6e
  • Built for inference, not training, and for custom or mid-size models rather than huge foundation models (those belong on Bedrock or, at the extreme, P7 instances).
  • No streaming in early tests: replies arrived complete, which matters for chat interfaces that show text as it’s generated.
  • Scaling isn’t instant: new instances take tens of seconds to launch, plus model loading. Sudden, huge spikes are a poor fit; queue work through SQS instead.
  • Tooling lag: at launch, the Terraform provider and Cloud Control didn’t know the new AcceleratorConfig block yet; check your tool’s version.

Troubleshooting

Symptom or errorLikely causeFix
“The image manifest, config or layer media type ... is not supported”An OCI image index with a provenance attestationRebuild single-platform with provenance off, push again
Instances never start; function never becomes ActiveG and VT vCPU quota too low (it can start at 0)Request quota for minimum environments × vCPUs
“MinimumExecutionEnvironments can’t be provisioned because CapacityProvider has reached maxVCpuCount limit”Republish needs room for new environments before old ones stopRaise MaxVCpuCount, or scale the old version down first
Function shows ActiveNonInvocableNo published version yetRun publish-version and invoke the published alias
Model fails to load or runs out of memoryAcceleratorMemorySize too small for the modelRaise it, or use a smaller or quantized model
Publishing takes many minutesLarge image and model download on first publishKeep weights in S3 with runai_streamer; trim the image
Requests time out behind API GatewayThe 29-30 second API limit, not the GPUAsynchronous job pattern

Why “inside your AWS account” matters

Plenty of GPU clouds offer serverless inference. The difference here is that Lambda GPU functions run in your own AWS account and VPC: they use IAM roles instead of separate API keys, reach your databases and S3 buckets over private networking, and are triggered natively by S3, SQS, EventBridge and the rest without webhooks or glue code. Logs and GPU metrics land in CloudWatch next to everything else. For teams with compliance rules about where data goes, that can matter more than the hourly price; for a quick experiment with no AWS footprint, an outside GPU service may still be simpler.

What real tests found

A full sweep of instance types

A developer who had tested the feature’s absence a year earlier tried every accelerated instance type in us-east-1 on launch day: 37 of 81 were accepted, all of them G-family. P-family, G7, Inferentia, Trainium and g5g were refused, and so were zip packages. A PyTorch benchmark ran about 66 times faster on the L4 GPU than on the same instance’s CPU. Their practical warning was the quota: with g6.xlarge (4 vCPUs) and the default three instances, you need 12 vCPUs of G quota before anything starts.

A small chat model on one L4

An AWS Community Builder served Google’s Gemma 4 E2B (4-bit) from a single g6.2xlarge with the vLLM image and published every number:

MeasurementResult
Single request speedAbout 127-133 tokens per second
48 simultaneous requests3,400-3,600 tokens per second in total; all 417 calls succeeded
Publish to Active (first time)484 seconds, mostly launching the instance and pulling a 9 GB image plus a 2.86 GB model
First image push398 seconds from a home connection
StreamingNone: replies come back whole

Their friction was in the pipeline, not the GPU: Docker’s default push format (an OCI image index with a provenance attestation) was rejected until they pushed a single-platform manifest, and a republish at the vCPU limit failed. Their verdict: for a model behind events and queues, a Lambda GPU function is the simpler road; for streamed chat replies or full control of the server, run vLLM on an EC2 G6 yourself.

Moving a rendering job off EC2

An AWS Hero moved a GPU podcast-rendering pipeline from a self-managed EC2 instance to Lambda Managed Instances, using the 90-minute asynchronous timeout for long renders. It’s the kind of job the feature fits best: triggered by an upload, heavy on GPU for a while, with nothing to keep a server patched for in between.

What people are saying

  • “I’ve been waiting for this one for a long time”: a common reaction from serverless developers who’d asked for GPUs on Lambda for years.
  • “EC2 prices plus a 9.75% vig”: the skeptical take from a popular AWS commentary account, adding that at least the markup is out in the open. The cost table above lets you judge it for your case.
  • The scaling caveat: a respected serverless writer had noted when Managed Instances launched that new EC2 instances take tens of seconds, so it isn’t for large, unpredictable spikes; that applies to GPUs unchanged.
  • Questions about fairness: testers asked how throughput splits across concurrent requests on one GPU; vLLM batches them together, so individual replies slow a little as the batch grows while total throughput climbs.

Lambda GPU, Bedrock, SageMaker or EC2?

Your situationBest fit
A popular model, low or spiky volumeAmazon Bedrock (per token, nothing idle)
Your own model, triggered by AWS events, steady-ish volumeLambda GPU
Video, image or 3D processing on uploadLambda GPU (90-minute async runs)
Training or fine-tuningSageMaker (see serverless fine-tuning) or EC2 GPU instances
Streaming chat from your own modelvLLM on EC2 G6, or containers on ECS
Rare jobs, a few times a weekBatch them; don’t keep a GPU warm

Before choosing, check how much GPU memory your model needs with our LLM VRAM calculator; a model that fits a fractional L4 (G6f) is a very different bill from one that needs an L40S. If you’re testing locally first and your GPU sits idle, see Ollama not using the GPU.

Checklist before your first publish

  1. Model memory checked, and the smallest GPU that fits chosen (G6f for small models, G6e for large ones).
  2. G and VT vCPU quota approved for minimum environments plus headroom.
  3. Capacity provider with two or three instance types and a sensible MaxVCpuCount.
  4. Image built single-platform, pushed to ECR in the same Region.
  5. Model weights in S3 in the same Region for production.
  6. Minimum environments set on purpose: 1 for tests, more only if you need zone redundancy.
  7. Budget alert and a tag on the function and capacity provider.
  8. A clean-up step written down: delete the function, then the capacity provider.

For platform teams

  • Quotas: request G and VT vCPU quota per Region in advance, with room for minimum environments, scaling and republishing.
  • Cost guardrails: set MaxVCpuCount on every capacity provider, review minimum environment counts, and tag functions so GPU spend is visible.
  • Networking: capacity providers run in your VPC subnets; plan routes to S3 (an endpoint saves NAT charges) and to model registries.
  • Images: standardize on AWS’s base images and single-platform builds; store images in ECR in the same Region.
  • Capacity: for predictable needs, an On-Demand Capacity Reservation matching the capacity provider is used automatically.
  • Clean-up: deleting a function isn’t enough; delete the capacity provider too, or instances keep running.

Common mistakes

MistakeWhat happensDo this instead
Assuming it scales to zeroThree GPU instances bill 24/7Set minimum environments deliberately; delete test setups
No G and VT quotaInstances never launchRequest quota first (minimum × vCPUs, plus headroom)
Pushing an OCI image indexCreateFunction rejects the imageSingle-platform build, provenance off
MaxVCpuCount set exactly to current useRepublish failsLeave room for a second set of environments
Pulling weights from Hugging Face in productionSlow starts, external dependencyWeights in S3 with runai_streamer
Putting a chat UI on it expecting streamingUsers wait for whole repliesEC2 or containers for streaming

What Ethan decided

  1. Product photos: a small vision model on Bedrock, called once per upload, a few dollars a month.
  2. Monthly catalog videos: a Lambda GPU function on one g6.2xlarge environment, published the day before the render batch and deleted afterwards, triggered by uploads to S3.
  3. A budget alert at $100 for anything tagged gpu, so a forgotten capacity provider can’t run for a month.
  4. If the shop ever trains its own model, that’s a SageMaker job, not Lambda.

Jake: "So we use the GPU for a day a month instead of all month?"

Ethan: "Exactly. Serverless GPU is great when you remember to switch the lights off."

For readers preparing for an AWS certification

We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.

Exams that test this topic: Developer – Associate (DVA-C03 from December 1, 2026) • Solutions Architect – Associate (SAA-C03) • Machine Learning Engineer – Associate (MLA-C02).

Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:

1. A team wants to run a custom computer-vision model on a GPU every time an image is uploaded to S3, without managing servers, drivers or scaling. Which option fits?

An AWS Lambda Event Function on Lambda Managed Instances with GPU (G-series) instances, packaged as a container image and triggered by S3 events.

2. How is a GPU-accelerated Lambda function on Lambda Managed Instances billed?

At the EC2 On-Demand price of the instances (Savings Plans and Reserved Instances apply) plus a management fee and per-request charges; there is no per-millisecond duration charge.

3. A new account cannot launch GPU instances for a Lambda capacity provider. What should be checked first?

The EC2 service quota for Running On-Demand G and VT instances (vCPUs), which can start at zero.

4. Which deployment package type is required for GPU-accelerated Lambda functions?

A container (OCI) image, typically stored in Amazon ECR; zip packages are not supported.

5. A team needs to invoke a popular foundation model a few hundred times a day with no infrastructure. Which service is usually cheapest?

Amazon Bedrock, billed per token with no idle cost.

Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.

For long jobs on Lambda generally, our 30-minute timeout guide covers the settings that matter; for multi-step pipelines around the GPU step, see durable functions and, for running untrusted code next to it, Lambda MicroVMs.

Official references

πŸ“š ALSO READ

Guides people open next:

GPU options on AWS change fast; we update this page when they do.

Frequently asked questions

Does AWS Lambda support GPUs?

Yes, since November 18, 2026, for Event Functions running on Lambda Managed Instances. Functions packaged as container images run on EC2 G-series GPU instances (G4dn, G5, G6, G6f, Gr6, Gr6f and G6e) without you managing drivers, CUDA or servers.

How much does Lambda GPU cost?

You pay the EC2 On-Demand price of the GPU instances, plus a 9.75% management fee and $0.20 per million requests, with no separate duration charge. A g6.2xlarge works out at about $1.07 an hour in US East including the fee.

Does Lambda GPU scale to zero?

Not by default. Instances bill while the function’s minimum number of execution environments is above zero, and the default is three environments spread across Availability Zones, which on GPU instances means three instances running around the clock. Lower the minimum for tests.

Which GPUs can Lambda use?

EC2 G-series at launch: G4dn (NVIDIA T4), G5 (A10G), G6 and Gr6 (L4), G6e (L40S), and G6f and Gr6f (a fraction of an L4). P-family, G7, Inferentia, Trainium and the Graviton-based g5g aren’t accepted.

Can I train models on Lambda GPUs?

It’s built and optimized for inference, not training. For training, use SageMaker, EC2 GPU instances or, at the top end, P-family instances.

Can I use a zip package for a GPU function?

No. GPU functions must be container (OCI) images, up to 32 GB. Push a single-platform image; an OCI image index with attestations is rejected.

Does Lambda GPU support response streaming?

Not in the launch-week tests: replies came back complete, so time to first token couldn’t be measured. For streamed chat replies, testers suggested running vLLM on an EC2 G6 instance yourself.

Why can’t I create a Lambda GPU function?

The most common reason is the EC2 quota for Running On-Demand G and VT instances, which can start at 0 vCPUs in new accounts. With the default three environments on g6.2xlarge you need 24 vCPUs of that quota.

How long does a Lambda GPU function take to start?

Publishing a version provisions the instances, pulls the image and loads the model before traffic arrives. One tester measured 484 seconds from publish to Active with a 9 GB image; scaling out later takes tens of seconds per new instance.

How many requests can one Lambda GPU environment handle?

Up to 48 concurrent requests per execution environment, sharing one copy of the model in GPU memory. The default is 4. One tester served 48 simultaneous requests at 3,400 to 3,600 tokens per second on a single L4.

What is the maximum timeout for a Lambda GPU function?

Up to 90 minutes for asynchronous and event source mapping invocations, and 30 minutes for synchronous invocations, as for other functions on Lambda Managed Instances.

Lambda GPU or Amazon Bedrock?

Bedrock, if a model it offers does the job: you pay per token and run nothing. Lambda GPU is for your own or custom models, open models Bedrock doesn’t host, and non-AI GPU work like rendering and transcoding.

What size model can I run on Lambda GPU?

Whatever fits in up to 48 GB of GPU memory (an L40S on G6e), including room for the KV cache. That covers small and mid-size models, for example an 8-billion-parameter model at 8-bit on an L4, or a 70-billion model at 4-bit on an L40S with little headroom.

How do I stop paying for a Lambda GPU function?

Delete the function and then its capacity provider. As long as the capacity provider keeps minimum environments running, the GPU instances keep billing even with no requests.

Can Lambda GPU be used for video transcoding?

Yes. Media processing and transcoding triggered on upload is one of the listed uses, the PyTorch base image includes FFmpeg, and asynchronous or queue-triggered runs can last up to 90 minutes each.

Can I use Savings Plans with Lambda GPU?

Yes. The GPU instances are EC2 On-Demand instances, so existing Savings Plans and Reserved Instances apply, and Lambda automatically uses a matching On-Demand Capacity Reservation if you create one.

Revision note. Written December 3, 2026, two weeks after Lambda GPU support launched on November 18. Prices are US East On-Demand rates from that day. “Don’t leave the lights on”: delete test capacity providers when you’re done.

Related