Extensions are a new way for tools to more easily integrate deeply into the Lambda execution environment to control and participate in Lambda’s lifecycle.
You can use extensions to integrate your Lambda functions with your preferred monitoring, observability, security, and governance tools. You can choose from a broad set of tools provided by AWS Lambda partners or you can create your own Lambda extensions.
Extensions use the Extensions API, a new HTTP interface, to register for lifecycle events and get greater control during function initialization, invocation, and shutdown. They can also use environment variables to add options and tools to the runtime, or use wrapper scripts to customize the runtime startup behavior.
Note: an internal extension runs in the runtime process, and shares the same lifecycle as the runtime. An external extension runs as a separate process in the execution environment. The extension runs in parallel with the function's runtime. It is initialized before the function is invoked and continues to run after the function invocation is complete
For more information, see Using AWS Lambda extensions.
In this repository you'll find a number of different sample projects and demos to help you get started with building your own extension. These include:
- AWS AppConfig extension demo
- Custom runtime extension demo
- Logs to Amazon S3 extension demo
- Extension in Go
- Extension in Python
- Extension in Node.js
- Logs API extension in Go
- Logs API extension in Python
- Logs API extension in Python for Elasticsearch
- Inter-process communication extension in Go
- Crash uploader extension in Go
- Lambda layer extension using SAM
- Wrapper script in Bash
- Wrapper script in Python
- Wrapper script in Ruby
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.