|
1 | | -#To run local runtime tests using using aws runtime simulator: |
2 | | -1. Gradlew build ./gradlew build to build lambda executable |
3 | | -2. Modify docker file to set proper path to lambda function executable |
4 | | -3. Run docker build -t sample:latest . |
5 | | -4. Start server docker run -p 9000:8080 sample:latest |
6 | | -5. Execute function via curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' |
7 | | -6. docker ps; docker stop CONTAINER_ID to stop the execution |
| 1 | +# Kotlin Native Runtime for AWS Lambda |
| 2 | +[](https://maven-badges.herokuapp.com/maven-central/io.github.trueangle/lambda-runtime/badge.svg) |
| 3 | + |
| 4 | +A runtime for executing AWS Lambda Functions powered by Kotlin Native, designed to mitigate known |
| 5 | +cold start issues associated with the JVM platform. |
| 6 | + |
| 7 | +Project structure: |
| 8 | + |
| 9 | +- lambda-runtime — is a library that provides a Lambda runtime. |
| 10 | +- lambda-events — is a library with strongly-typed Lambda event models, such |
| 11 | + as `APIGatewayRequest`, `DynamoDBEvent`, `S3Event`, `KafkaEvent`, `SQSEvent` and so on. |
| 12 | + |
| 13 | +The runtime supports the |
| 14 | +following [OS-only runtime machines](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html): |
| 15 | + |
| 16 | +- Amazon Linux 2023 (provided.al2023) with x86_64 architecture |
| 17 | +- Amazon Linux 2 (provided.al2) with x86_64 architecture |
| 18 | + |
| 19 | +## Performance |
| 20 | + |
| 21 | +Performance benchmarks reveal that Kotlin Native's "Hello World" Lambda function, executed on Amazon |
| 22 | +Linux 2023 (x86_64) with 1024MB of memory, ranks among the top 5 fastest cold starts. Its |
| 23 | +performance is on par with Python and .NET implementations. For a comparison with other languages ( |
| 24 | +including Java), visit https://maxday.github.io/lambda-perf/. |
| 25 | + |
| 26 | + |
| 27 | +<img src="" alt="Kotlin Native AWS Lambda Runtime benchmarks" width="800"/> |
0 commit comments