Make .NET AWS Lambda functions start 10x faster using LambdaNative.
To use LambdaNative in your own project, please see the README in the example directory.
At the end of 2018, AWS announced Custom Runtimes and the Runtime API that enables them. In a nutshell, you select Custom Runtime and provide an executable named file bootstrap
(in your ZIP file) which AWS Lambda will execute instead of its own. You're then responsible for interacting with an HTTP API to get executions, running handler code, and reporting the result or any errors back to the API.
LambdaNative is a library that handles all the API interaction and error handling for you. All you need to do is tell it which handler to execute by implementing an interface and calling LambdaNative.Run
.
You can then use CoreRT to perform ahead of time compilation, producing a native executable that doesn't require any runtime compilation.
Below is a comparison between a standard function and one running under LambdaNative. The function deserialies a request object, writes to DynamoDB, publishes an SNS message, and returns a response object.
For more information and comparisons, please read this Medium post.
Clone repository
> git clone https://github.com/zaccharles/lambda-native.git
Restore NuGet packages
> dotnet restore
Build solution
> dotnet build
Run unit tests
> dotnet test
If you find any problems or have any suggestions, please raise an issue or send a pull request.
This project is licensed under the MIT License - see the LICENSE file for details