Lambda GPU Inference: Self-Host or Call an API
AWS Lambda GPU functions launched November 18, 2026. You pay EC2 rates plus 9.75 percent and a request fee. Here is when that beats an OpenAI-style API.
By Muhammad Saif and Aashan Khan · Techtribe co-founders
On November 18, 2026 AWS announced GPU support for Event Functions on Lambda Managed Instances. The news post, AWS Lambda now supports GPU instances, says you can run inference, media work, and similar GPU jobs on EC2 G-series instances while Lambda handles provisioning, scaling, and the event integration. You bring a container. You do not manage the GPU driver or the Kubernetes cluster.
The bill is still a GPU bill. AWS's pricing line is the EC2 price for the instance, eligible for Savings Plans and Reserved Instances, plus a 9.75 percent management fee for GPU instances, plus $0.20 per million requests. You pay for capacity you hold, not for an abstract token. That is the whole comparison with an API such as OpenAI's, or with Bedrock: one price tracks requests and tokens on someone else's model, the other tracks hours of a specific card plus a management fee and a small request charge.
This note is the decision, with the November launch as the new option in the middle. All-day API spend with no cap is the failure mode in what an agent spends when nobody stops it. Whether the prompt is allowed to leave your account at all is in how model providers leak prompts. Read those before you move a workload to save money and accidentally move the data, or keep the data and accidentally keep an idle GPU.
What you actually get
GPU functions on Lambda Managed Instances run on G-series EC2. AWS's documentation lists families including G4dn with NVIDIA T4 GPUs and 16 GB of accelerator memory, G5 with A10G and 24 GB, G6 and Gr6 with L4 and 24 GB, G6e with L40S and 48 GB, and fractional L4 sizes on G6f and Gr6f. Metal sizes are excluded for G4dn. The set will change. The point of the list is that you are choosing a card with a known memory ceiling, not "a model endpoint."
Lambda manages the drivers and can run multiple invocations in one execution environment so the card stays busy. Scaling uses GPU utilization, CPU, and concurrency. The function is still an event function: S3, queues, API Gateway, and the rest of Lambda's event sources can invoke it. That is the product argument against a cluster you operate yourself. A file lands in a bucket, a function runs a model, a result lands somewhere else, and you did not write the scaler.
For language models, AWS ships a vLLM image and an SGLang image that speak an OpenAI-compatible HTTP API. The image starts the server during initialization and forwards invocations to it, so one copy of the model serves concurrent calls and batches them. You set MODEL_ID. A PyTorch image is there for work that is not "serve a chat model." The what's-new post says this is aimed at inference rather than training, and at custom and small-to-mid-size models rather than the large foundation models already sold through Bedrock.
Where the weights come from matters on the second day. The docs allow a Hugging Face id, which the image downloads during init. That needs network egress, ephemeral disk, and, for gated models, a token. AWS tells you to set that token as an environment secret, not to bake it into the image, and says a Hugging Face download is fine for a test and a poor production path: it depends on the public hub, it repeats every time a new execution environment starts, and it slows scale-out. The production path in the docs is to copy the weights into S3 in the same region and point MODEL_ID at that prefix, with a gateway endpoint so the pull does not wander the internet. There is also streaming from S3 and Seekable OCI lazy loading, which exist to cut the cold start you will otherwise pay for on every scale-out.
Availability is commercial regions where both Lambda Managed Instances and the G-series type exist. The feature was marked generally available at launch, not a single-region preview. Confirm the region you already keep data in before you design around a card that region does not offer.
Three bills, not two
Compare three setups, because "self-host or OpenAI" skips the option AWS just made easier.
An external API. You send tokens, you get tokens, you pay the provider's rate, and you accept that provider's retention and model changes. At low volume this is almost always cheaper, because an idle GPU is the most expensive zero-request hour in the building. Quality is the reason people stay: a frontier model may answer a support task that a small open model fails. If you have not evaluated that gap on your own prompts, you do not have a cost comparison. You have a price list.
Bedrock or the same provider's managed model hosting. You stay inside a cloud bill, you pick from models AWS or another cloud already operates, and you do not bring a container. AWS is explicit that large foundation models on Bedrock are not the workload this GPU function replaces. Use the managed model when it is good enough and the retention terms fit. Use the GPU function when the model is yours, or open, and you want it on a card you can name.
Lambda GPU, or a GPU you run yourself. Lambda GPU is the managed middle. You pay EC2 plus 9.75 percent plus the request fee, and you avoid the cluster. A GPU box or a Kubernetes node pool you already operate can be cheaper than that 9.75 percent if the people and the toil are already paid for, and more expensive if they are not. Do not compare the EC2 price to an API price and ignore the engineer who will own drivers, CUDA versions, and a broken node at 2 a.m. Lambda's claim is that those are the costs it removes. Your claim has to be that the remaining bill, at your traffic, beats the API.
A fourth number belongs on the same spreadsheet: the cost of a wrong answer. A cheaper model that escalates to a person, or that calls a frontier model on the hard cases, can beat both a pure API design and a pure self-hosted design. Route on purpose. A single endpoint for every task is how teams overpay for easy traffic and under-serve the hard traffic.
A way to run the numbers without a finance project
Take one week of production calls, or a honest reconstruction from logs.
Count input tokens, output tokens, and requests. Separate interactive traffic from batch traffic. Interactive traffic cares about the time to first token. Batch traffic cares about the hour the job finishes and can wait for a queue. Lambda GPU is an event function. It is a natural fit for "an object was created, run the model." It is a fit for chat only if the cold start and the batching behavior meet the latency you told users they would get. Measure a cold start with your weights in S3 before you promise a chat box.
Price the API week with the rate card you are actually on, including any minimums. Price a Lambda GPU week by picking the smallest card whose memory holds the model you have already tested, then estimating how many instances stay up to meet concurrency. Multiply the EC2 on-demand price by 1.0975, add $0.20 per million requests, and add storage for the weights. If the traffic is steady enough for a Savings Plan, redo the EC2 portion with that rate. If the traffic is zero at night, include the night. An API bill goes quiet when users sleep. A reserved GPU does not, unless scale-to-zero actually works for your configuration and you have tested the wake-up.
Compare quality on fifty prompts you care about, not on a leaderboard. If the self-hosted model fails the prompts that justify the product, the cheaper bill is a different product. Say so in the write-up. The decision is allowed to be "stay on the API." The November launch does not obligate you to move.
Data residency can dominate the spreadsheet. If the prompt cannot leave the account, the API option's price is infinite and the comparison is Lambda GPU versus a GPU you run, or versus a managed model in-region whose contract you accept. If the prompt can leave, do not self-host only because it feels safer. A GPU function with the weights in a world-readable bucket and the logs in a shared account is not safer. The boundary work still applies.
Write the result as one page: volume, latency, the card, the monthly range, the quality gap, and the data constraint. Revisit it when volume doubles or when the provider changes the rate card. A decision made at a thousand requests a day is not a decision at a hundred thousand.
What has to be true for the GPU function to stay cheap
The model weights live in S3 in-region, and the execution role can read that prefix and nothing else. A role that can read every bucket because the function "might need it" is the same mistake as an agent with production keys. The Hugging Face token, if a test environment still has one, is a secret in the account's secret store, not a layer in the image and not a line in the repository.
Ephemeral storage is sized for the weights and the batch, and not used as a second data store. The what's-new post mentions NVMe ephemeral storage up to 32 GB for large artifacts. That is a cache. The durable copy is S3. If an environment is recycled, the cache goes with it, which is what you want.
Concurrency limits exist. A function that scales to the account maximum because a queue flooded will buy a pile of GPUs you did not budget. Reserved concurrency is the cap. A poison message should land in a dead-letter queue, not in a retry loop that holds a GPU. The token-cost post's lesson about uncapped retries applies to cards as well as to APIs.
Logs do not contain the full prompt when the prompt is sensitive. You need enough telemetry to know latency, errors, and GPU utilization. You do not need a second copy of every customer document in CloudWatch. Set the retention. A forgotten log group is a data store.
The image is built from the vendor base, pinned by digest, and rebuilt when you choose, not on every upstream push. A floating tag is how a Tuesday patch changes your model server. Scan the image. A GPU base image is a large supply chain. Treat it like one.
Cold starts are measured with the production artifact. A demo that loaded a tiny model from the hub is not the number. If scale-from-zero misses the latency target, the honest options are a minimum instance count, which you then put in the cost model, or a return to an API for the interactive path. Pretending the cold start will be fixed later is how the chat product misses its own SLA.
Utilization is watched. Lambda's scaling story works if the card is busy. A single request every ten minutes on an L40S is a donation. Move that workload back to an API or to a smaller card. The 9.75 percent fee is noise next to an idle high-end GPU, and it is noise you still pay.
What does not hold
"Serverless means we only pay when it runs" does not hold for this feature in the way it holds for a tiny CPU function. You pay EC2 price for the instances Lambda provisions, plus the fee, plus requests. Read the pricing page for the capacity provider you configured. A mental model imported from a 128 MB function will be wrong by an order of magnitude.
"Open source model means free inference" does not hold. The weights may be free to use and the GPU is not. Power, memory, and the engineer are the cost. A license field on the model card can also forbid the product use you planned. Read it before you put the model behind your login.
"We will move off the API later" does not hold as a design. The prompts, the tool definitions, and the evaluation set have to exist now, or the later move has nothing to test. Keep the application on an interface you own, with the provider behind it. Then the move is a configuration change plus an eval run. An application that calls a vendor SDK in forty places will not move when the bill hurts. It will grow a discount negotiation instead.
A single-week spike does not hold as the forecast. Launch week, a backfill, and a stuck retry can each dominate the average. Look at the median hour and the worst hour. Size the cap for the worst hour you are willing to pay for, and shed or queue the rest. An uncapped GPU scaler is a credit card attached to a queue.
Copying production prompts into a notebook to try a smaller model does not hold as an evaluation process. Use a set you are allowed to store, with the sensitive fields removed. The cost project is not a reason to build a second, sloppier copy of customer data.
A decision you can defend in a meeting
If the week of traffic costs less on the API than the smallest always-available card, stay on the API and spend the engineering time on caps, caching, and shorter prompts. Those savings are real and they do not add a GPU to the on-call rotation. The token-cost note is the checklist.
If the week of traffic costs more on the API, the quality eval on an open model passes, and the data is allowed to sit in your account, pilot one batch workload on Lambda GPU with weights in S3 and a concurrency cap. Batch first, because latency surprises hurt less. Expand to interactive only after the cold start is a number you have seen.
If the data cannot sit with an external API and you do not want to own a cluster, the pilot is the product path, not an optimization. Budget the card as a fixed cost. Pick the memory size the model requires, not the size a blog used for a 1.5B demo. A model that does not fit is not a discount. It is an outage.
If you already run GPUs badly, with drivers no one wants to touch, Lambda's fee can be the cheaper way to stop doing that, even when raw EC2 looks better on paper. Put a number on the toil. A page at 2 a.m. is a cost. So is a hiring plan for a platform engineer you do not have.
Review the decision when the provider cuts prices. API prices move down in jumps. A self-hosted stack that was rational in November can be wasteful in March, and the reverse happens when your volume grows into the GPU you already pay for. Put a date on the one-pager. A cost architecture without a review date becomes a religion.
The same page should name the person who can turn the function's concurrency to zero. A pilot that cannot be switched off is a production system. Treat it like one on the day it starts handling real customer content, including the logging and the key scope. Pilots are how idle GPUs and wide IAM roles survive into the following year.
If this is your app, send the repo.
A 30-minute scope call. We read what is live, name what is dangerous, and quote a fixed scope.
How Techtribe picks the infrastructure from your traffic
We take a week of real calls, price the API you use against a GPU function that can actually hold a model you have evaluated, and say which one wins on cost, latency, and the data rule you already have. If the GPU path wins, we wire the weights from S3, the concurrency cap, and the logs so the pilot cannot scale itself into a surprise. If the API wins, we put the cap and the cache on the path you already have, which is often the larger saving.
That work sits inside a Production MVP when the model is part of a product you are launching: routing, fallbacks, evals, and cost monitoring are included because a GPU without those is a demo with a large bill. A Dedicated Team fits when the traffic mix keeps shifting and someone has to own the page of numbers. LLM development is the build if the application around the model does not exist yet.
Bring the invoice, a week of request volumes, the latency you owe users, and a yes or no on whether prompts may leave your cloud account. If you do not have volumes, the first deliverable is the log that produces them. We would rather delay the GPU decision by a week than buy a card for a workload nobody measured.
The fixed scope for taking a generated app to production is a page per tool: Lovable, Bolt, v0, and Replit.
Questions
What did AWS launch on November 18, 2026?
GPU-accelerated Event Functions on Lambda Managed Instances, using EC2 G-series GPUs. Lambda manages drivers, scaling, and event sources. You deploy a container. AWS provides base images for vLLM, SGLang, and PyTorch, including an OpenAI-compatible server so a small or mid-size model can answer without you writing a handler.
What does it cost?
AWS says you pay the underlying EC2 instance price, which can use Savings Plans and Reserved Instances, plus a 9.75 percent management fee on GPU instances, plus the standard Lambda request fee of $0.20 per million requests. There is no separate GPU surcharge beyond that. You still pay for the time the instance exists, not only for tokens.
Is this a replacement for OpenAI or Bedrock?
AWS describes the feature as a fit for custom and small-to-mid-size models, media, and batch-style GPU work, and says large foundation models already on services like Bedrock are a different choice. If your product depends on a frontier model's quality, moving the same prompts to a 7B model on a T4 will change the product, not only the bill.
What should we measure before choosing?
A week of real requests: tokens in and out, latency users tolerate, how steady the traffic is, and whether the data may leave your account. Spiky, low-volume chat on a frontier model usually stays on an API. Steady traffic on one open model you have already evaluated is where a GPU function can win.