Open source repositories - Amazon Lambda
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Open source repositories

Amazon Lambda provides a variety of open source tools, libraries, and components to help you build, customize, and optimize your serverless applications. These resources include runtime interface clients, event libraries, container base images, development tools, and sample projects that are maintained by Amazon and available on GitHub. By leveraging these open source repositories, you can extend Lambda's capabilities, create custom runtimes, process events from various Amazon services, and gain deeper insights into your function's performance. This page provides an overview of the key open source projects that support Lambda development.

Runtime Interface Clients

Lambda Runtime Interface Clients (RICs) are open source libraries that implement the Runtime API and manage the interaction between your function code and the Lambda service. These clients handle receiving invocation events, passing context information, and reporting errors.

The runtime interface clients used by Lambda's managed runtimes and container base images are published as open source. When you build custom runtimes or extend existing ones, you can use these open source libraries to simplify your implementation. The following open source GitHub repositories contain the source code for Lambda's RICs:

For more information about using these clients to build custom runtimes, see Building a custom runtime for Amazon Lambda.

Event libraries

Lambda event libraries provide type definitions and helper utilities for processing events from various Amazon services. These libraries help you parse and handle event data in a type-safe manner, making it easier to work with events from services like Amazon S3, Amazon DynamoDB, and Amazon API Gateway.

For compiled languages, Amazon provides the following event libraries:

For interpreted languages like Node.js, Python, and Ruby, events can be parsed directly as JSON objects without requiring a separate library. However, developers using Node.js and Python can leverage powertools for Amazon Lambda, which provides built-in schemas for Amazon events that offer type hinting, data validation, and functionality similar to what compiled language libraries provide.

Container base images

Amazon provides open source container base images that you can use as a starting point for building container images for your Lambda functions. These base images include the runtime interface client and other components needed to run your functions in the Lambda execution environment.

For more information about the available base images and how to use them, see the Amazon Lambda Base Images repository and Create a Lambda function using a container image.

Development tools

Amazon provides additional open source development tools to help you build and optimize your Lambda functions:

Powertools for Amazon Lambda

Powertools for Amazon Lambda simplifies serverless development with essential utilities to prevent duplicate processing, and batch processing for multi-record handling and Kafka consumer library. These features help you minimize code complexity and operational overhead.

You can also leverage built-in event schema validation, structured logging and tracing, and parameter store integration which are designed to accelerate the creation of production-ready Lambda functions while following Amazon well-architected best practices.

GitHub repositories:

Java development tools

  • Java Profiler (experimental) - A tool for profiling Java Lambda functions.

  • Java Libraries - A repository that contains a comprehensive collection of Java libraries and tools for Lambda development, including key projects such as JUnit testing utilities and profiling tools.

  • Serverless Java Container - A library that enables you to run existing Java applications on Lambda with minimal changes.

.NET development tools

The Amazon Lambda .NET repository provides .NET libraries and tools for Lambda development, including key projects such as for Amazon Lambda tools for the .NET CLI and .NET Core server for hosting .NET Core applications.

Sample projects

Explore a comprehensive collection of sample Lambda projects and applications at Serverless Land repositories. These samples demonstrate various Lambda use cases, integration patterns, and best practices to help you get started with your serverless applications.