AWS Lambda

Security & Safety 💻 Python ⚖️ Apache-2.0 🟢 Actively maintained
294 stars

AWS Lambda Python Runtime Interface Client (RIC) is a lightweight package that implements the Lambda Runtime API, allowing you to make custom container images Lambda-compatible. It solves the problem of extending preferred base images to run Lambda functions. It is for developers who want to package Lambda functions as container images using Python.

✨ Key features

  • Implements Lambda Runtime API for Python
  • Supports Python 3.9 to 3.13
  • Installable via pip as awslambdaric
  • Works with Amazon Linux 2, Alpine, Debian, Ubuntu
  • Enables local testing with Runtime Interface Emulator

🎯 Use cases

  • Create Docker images for Lambda functions
  • Run Lambda functions in custom base images
  • Test Lambda container images locally with RIE
  • Extend preferred base images to be Lambda compatible

📦 Installation

🧰 Requirements: Python 3.9.x to 3.13.x; Linux OS (Amazon Linux 2, Alpine, Debian, Ubuntu); Docker for local testing.

Install via pip:

pip install awslambdaric

For building from source, clone the repository and run:

make init
make build

🚀 Usage

Example Dockerfile snippet:

FROM public.ecr.aws/docker/library/python:buster

# Copy function code and install RIC
COPY app/* ${FUNCTION_DIR}
RUN pip install --target ${FUNCTION_DIR} awslambdaric

ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
CMD [ "app.handler" ]

Example handler app.py:

def handler(event, context):
    return "Hello World!"

⚠️ Good to know

The package currently supports Python versions 3.9.x up to and including 3.13.x; no other limitations are stated.

❓ FAQ

How do I install the AWS Lambda Python Runtime Interface Client?

You can install it via pip: pip install awslambdaric.

What Python versions are supported?

The package supports Python versions 3.9.x up to and including 3.13.x.

How can I test my Lambda container image locally?

You can use the AWS Lambda Runtime Interface Emulator (RIE) to test locally. Download RIE and run your container with the emulator as the entrypoint, then invoke it via HTTP.

What operating systems are supported for the base image?

The supported Linux OS distributions are Amazon Linux 2, Alpine, Debian, and Ubuntu.

📊 Repository

Stars★ 294
Forks🍴 84
Open issues🐛 38
Last commit🕒 Aug 25, 2026
Created📅 Sep 2020
Language💻 Python
License⚖️ Apache-2.0

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.