r/aws • u/TechnologyMatch • 14d ago
discussion Lambda can run on GPU instances now. Would you actually use it for inference?
AWS added G-series GPU instances for Event Functions on Lambda Managed Instances this week, aimed at ML inference, media processing and rendering.
Most GPU inference on AWS today runs on ECS, EKS or SageMaker endpoints, so it’s not obvious where this fits yet.
Anyone planning to try it? And if so, what would it replace for you?
25
Upvotes
10
u/mattjmj 14d ago
I can't speak for managed instances specifically, but for heavily bursty/batch workloads that parallelise easily, I've done a lot of small inference (traditional ML, tiny embedding models, etc) on lambda in CPU and found it much more cost effective than other approaches. It's a tight trade off as in those cases the latency saving of mass parallelisation was worth the CPU cost overhead. LMI might make that more practical for constant or less batched workloads, but loses that burst benefit. I'd definitely consider using it with any sort of consistent load use case that took advantage of the event handling. Lambdas event consuming engine is very good at not having to manage that is a massive cost saving in itself.
5
u/mequelkramer 14d ago
I would try it for event driven, spiky inference where a SageMaker endpoint would sit idle most of the day, for example image or document jobs arriving in batches from S3 or SQS. The win is not raw GPU speed, it is skipping endpoint management and paying only when events arrive. Before committing I would measure cold start with the model loaded, check how large the model artifact is, and compare GB-second plus GPU time against a small SageMaker endpoint or an ECS service with scale to zero. For steady, high volume traffic a persistent endpoint usually wins on latency and cost, while for bursty, low average volume work this looks like a good middle ground.
3
u/lark0221 14d ago
For bursty, low-volume inference this could beat keeping a SageMaker endpoint or a GPU node warm 24/7 just in case. For steady traffic I'd still put it on ECS/EKS with reserved or Savings Plan GPUs, the per-hour math wins once utilization is high.
The thing I'd test first is cold start. Pulling a multi-GB model into a fresh environment is where this either works or doesn't.
5
u/keto_brain 14d ago
I personally cannot think of a reason because Bedrock already supports a wide range of models, there could be use case to run something from Hugging Faces or (and I'm not even sure if this is allowed in the AWS ToS so don't try it without checking) a uncensored model, so this seems like an edge case maybe for Pharma or other regulated industries who need to run something very specific.
But it's a good question and I'm very interested in what use cases people have actually come up with for this.
3
u/ducki666 14d ago
Hm... why not Bedrock?
2
u/NoDevelopment206 14d ago
the cold start with a big model loaded is what would stop me. if the model is a few gb you pay for loading it on every fresh instance, so it only makes sense when traffic is spiky and the model is small. for steady load an ecs service with scale to zero is probably simpler
1
u/Ok_Chip1234 14d ago
lambda’s per invoke limits don’t really maximize gpu usage do they
0
u/kobumaister 14d ago
Why would you do that? Warm up time will be huge
-1
u/cranberrie_sauce 14d ago
openrouter