OpsCanary
awslambdaPractitioner

Unlocking GPU Power in AWS Lambda: What You Need to Know

5 min read AWS BlogNov 18, 2026Reviewed for accuracy
Share
Practitioner — Hands-on experience recommended

AWS Lambda's support for GPU instances is a game changer for developers looking to harness the power of GPU-accelerated functions without the overhead of server management. This capability allows you to run complex workloads, such as machine learning inference and data processing, with the scalability and flexibility of serverless architecture.

To get started, you build an Open Container Initiative (OCI) image and configure your function to use it. Lambda takes care of provisioning, scaling, and integrating events. You can allocate between 2,048 to 32,768 MB of memory and up to 48 GB of accelerator memory. The configuration options include specifying a capacity provider, which defines the GPU instance types Lambda can utilize and enables auto-scaling. For instance, you can set up a capacity provider with a maximum of 96 vCPUs and define allowed instance types like g5.2xlarge and g6.2xlarge.

In production, remember to request an increase to your G-series instance quota before diving in, as new accounts may start with a quota of 0. Pay attention to the ephemeral storage limits of 32 GB and the concurrent request limits of 48 per execution environment. These factors can impact your function's performance and scalability, so plan accordingly.

Key takeaways

  • →Build OCI images to leverage GPU-accelerated functions in Lambda.
  • →Configure CapacityProviderName to define GPU instance types and enable auto-scaling.
  • →Allocate up to 48 GB of accelerator memory for intensive workloads.
  • →Request an increase to your G-series instance quota before using GPU instances.
  • →Monitor ephemeral storage limits to avoid performance bottlenecks.

Why it matters

This feature significantly enhances the capabilities of AWS Lambda, allowing teams to run high-performance applications without managing infrastructure. It can lead to reduced latency and improved throughput for compute-intensive tasks.

Code examples

Shell
aws --region us-east-2 \
  lambda create-capacity-provider \
  --cli-input-json file://cli-skeletons/create-capacity-provider_gpu.json
Shell
aws --region us-east-2 \
  lambda create-function \
  --cli-input-json file://cli-skeletons/create-gpu-llm-function.json

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
DigitalOceanSponsor

Simple, affordable cloud — VMs, Kubernetes, and managed databases in minutes. Trusted by 600,000+ developers. Spin up a Droplet in 60 seconds.

Try DigitalOcean →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.