explaingit

lambci/docker-lambda

5,787C#Audience · developerComplexity · 2/5Setup · easy

TLDR

Run and test AWS Lambda functions locally using Docker containers that exactly replicate the Lambda cloud environment, catching bugs before deployment. Note: this project is archived, AWS now publishes official replacement images.

Mindmap

mindmap
  root((docker-lambda))
    Local Testing
      Run functions locally
      Match Lambda environment
      Catch bugs early
    Supported Runtimes
      Node.js Python
      Java Go Ruby
      Other runtimes
    Container Modes
      Single invocation
      Persistent HTTP API
      Watch mode
    Build Tools
      Compile native code
      Package functions
      Build variants
    Project Status
      Now archived
      AWS official images
      Migration links
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Test your Lambda function on your laptop before pushing it to AWS, so you catch bugs without paying for cloud runs.

USE CASE 2

Check that compiled native dependencies will link correctly in the Lambda environment before deploying.

USE CASE 3

Iterate quickly on function code using watch mode, which reloads your function automatically on file changes.

USE CASE 4

Invoke your function repeatedly via a local HTTP API without the overhead of restarting a container each time.

Tech stack

DockerAWS LambdaNode.jsPythonJavaGoRuby

Getting it running

Difficulty · easy Time to first run · 30min

Project is archived. AWS now publishes official replacement images, use those for new projects. Requires Docker installed locally.

No license information mentioned in the explanation.

In plain English

docker-lambda was a project that let you run and test AWS Lambda functions on your own computer before deploying them to Amazon. AWS Lambda is a cloud service where you upload a small piece of code and Amazon runs it for you, charging per execution rather than per server. The catch is that Lambda runs in a specific controlled environment, so code that works on your laptop might behave differently in the cloud. docker-lambda solved this by packaging that exact Lambda environment inside Docker containers that you run locally. The README opens with a deprecation notice. This project is now archived, and AWS itself publishes official replacement images. The README links to those replacements, so if you are looking for this type of tool today, you would use the official AWS images rather than this project. When it was active, you could mount your function code into the Docker container and run it as if Lambda were executing it. The container matched the Lambda environment so closely that file paths, installed libraries, environment variables, and even the user account running the process were identical to what you would get on AWS. You could use this to test your function logic, verify that native compiled dependencies would link correctly on Lambda, and catch environment-specific bugs before a deployment. The project also supported a mode where the container stayed running and exposed a local HTTP API, so you could invoke your function repeatedly without the startup cost of launching a new container each time. There was also a watch mode that detected file changes and reloaded your function automatically, useful when you are iterating quickly on code. Build variants of the images included extra tools for compiling code and packaging functions using common build systems. Docker images were provided for most Lambda runtimes: Node.js, Python, Java, Go, Ruby, and others.

Copy-paste prompts

Prompt 1
How do I mount my Python Lambda function code into the docker-lambda container and run it locally to test it?
Prompt 2
Which docker-lambda image should I use for my Node.js Lambda function, and how do I invoke it with a test event?
Prompt 3
How do I use the persistent HTTP API mode to invoke my Lambda function multiple times without restarting the container?
Prompt 4
What are the official AWS replacement images now that docker-lambda is archived, and how do I migrate to them?
Prompt 5
How do I use the docker-lambda build variant images to compile native dependencies that will work on Lambda?
Open on GitHub → Explain another repo

← lambci on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.