What Languages Does AWS Lambda Support?

AWS Lambda ships managed runtimes for five language families: Node.js, Python, Java, .NET (which covers C# and PowerShell), and Ruby. Go and Rust are supported as well, but through the OS-only runtime. That means you compile your code to a binary and Lambda runs that binary on Amazon Linux. Any other language, such as PHP, Swift, or C++, runs through a custom runtime that you supply, or inside a container image of up to 10 GB.

A runtime, in Lambda's vocabulary, is the language-specific layer that receives each event, hands it to your function, and returns the result. A managed runtime is one that AWS builds, patches, and keeps current for you. This page lists the options, explains cold starts, and gives a rule for choosing a language. If you came here for the languages Amazon writes its own services in, that question is answered in Which language is Amazon written in?.

The full list, and how each language runs

LanguageHow it runsTypical cold startNotes
PythonManaged runtimeFast, usually well under a secondMost common choice for short functions
Node.js (JavaScript, TypeScript)Managed runtimeFast, usually well under a secondTypeScript is compiled to JavaScript first
JavaManaged runtimeSlow, often 1 second or moreSnapStart removes most of the delay
.NET (C#, F#, PowerShell)Managed runtimeSlow, often 1 second or moreSnapStart available
RubyManaged runtimeFastLess common, fully supported
GoOS-only runtimeFast, a small compiled binaryProvide a handler binary named bootstrap
RustOS-only runtimeFastest of the groupOfficial Rust runtime library from AWS
PHP, Swift, C++, othersCustom runtime or container imageDepends on the languageYou maintain the runtime layer

Version numbers are left out on purpose. AWS adds a managed runtime when a language version reaches long-term support, and retires it when the language community stops patching that version. The exact list therefore changes every few months.

What a cold start is

Lambda does not keep your code running between requests. When a request arrives and no ready copy of your function exists, Lambda creates a new execution environment, which is a small isolated virtual machine. It then downloads your code, starts the language runtime, and runs any setup code outside your handler. The time that takes is the cold start, and it is added to the response time of that one request.

After the first request, Lambda keeps the environment warm for a while and reuses it. The next requests skip the whole sequence. A function that receives steady traffic sees cold starts rarely. A function that receives one request every 20 minutes may see a cold start on every request.

The size of the cold start depends on the language. Python and Node.js start in a fraction of a second, because the interpreter is small and starts fast. Java and .NET load a virtual machine and compile code before the first line runs. For a function with many dependencies, that commonly takes one to several seconds. Go and Rust produce a single compiled binary, so they start about as fast as Python with no interpreter at all.

The two ways to remove cold starts

SnapStart. Lambda runs your function's setup once at deployment and takes a snapshot of the initialized memory. On each cold start it restores from that snapshot instead of starting from nothing. AWS offers SnapStart for Java, Python, and .NET, and it brings a Java cold start from seconds to well under a second. Your setup code must be safe to run once and reuse, so it must not generate a secret that later copies would share.

Provisioned concurrency. You tell Lambda to keep a fixed number of environments, say 10, initialized and waiting at all times. Requests up to that number never see a cold start, and it works for every runtime including custom ones. The cost is that you pay for those 10 environments whether or not they receive traffic.

How to choose a language for Lambda

Match the language your team already writes. A Lambda function is a small piece of a larger system, and the larger system sets the language. A Java team should write Java functions and turn on SnapStart rather than learn Python for one part.

Where there is no existing code, prefer Python or Node.js for short functions that connect services, such as one that reads a queue message and writes a database row. They start fast, the AWS libraries are included in the runtime, and a 30-line function is quicker to write in either of them than in Java.

Prefer Go or Rust when CPU cost is the concern. Lambda charges by memory multiplied by running time in milliseconds. A function that runs 3 times faster therefore costs about 3 times less, and at high volume that difference is a real cost.

What to say when an interviewer asks about serverless

When an interviewer asks whether you would use serverless for a part of a design, they want the trade-off, not a yes or no. A good answer names three things.

First, name the fit. Lambda suits work that is short, event driven, and uneven in volume, such as resizing an uploaded image or processing a webhook. It does not suit a service that runs at a steady 5,000 requests per second, where a container is cheaper.

Second, name the limits. A function runs for at most 15 minutes and can use at most 10 GB of memory, so a long batch job goes elsewhere.

Third, name the cold start and how you would handle it. This is where runtime choice enters. Use Python or Node.js for the low-traffic path, SnapStart or provisioned concurrency if the path is latency sensitive, and a plain container if neither is acceptable.

What AWS programming means more broadly is covered in What is AWS programming?.

How to Prepare

  • Learn the serverless trade-off as a design pattern. Grokking the System Design Interview covers where event-driven functions fit next to queues, caches, and databases.
  • Memorize the three numbers. A 15-minute maximum run time, 10 GB of memory, and a 10 GB container image are the limits interviewers expect you to know.
  • Deploy one function in two languages. Write the same 20-line handler in Python and in Java. Invoke each after a 30-minute pause and record the cold start you observe.
  • Build the vocabulary underneath. Grokking System Design Fundamentals explains queues, event-driven design, and latency budgets, which are the terms a serverless answer is built from.
TAGS
System Design Fundamentals
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
What is smart interview method?
Why is it called Okta?
What is the difference between a field and a property?
Which website is best for problem-solving?
What is OpenAI used for?
What is mock test in interview?
Related Courses
New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$123

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Grokking Modern AI Fundamentals course cover
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
4.1
Discounted price for Your Region

$72

Design Gurus logo
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.