ZIO Lambda
ZIO Lambda is a ZIO-based AWS Custom Runtime compatible with GraalVM Native Image. It lets you write an AWS Lambda function as a ZIO program, with typed JSON events in and typed JSON responses out, and deploy it as a GraalVM native binary.
Installation
To add ZIO Lambda to an sbt project, declare the core module and, optionally, the event and response modules:
libraryDependencies += "dev.zio" %% "zio-lambda" % "1.0.6"
// Optional dependencies
libraryDependencies += "dev.zio" %% "zio-lambda-event" % "1.0.6"
libraryDependencies += "dev.zio" %% "zio-lambda-response" % "1.0.6"
The core module depends on zio-json, so you do not need to declare it yourself. ZIO Lambda uses zio-json to decode the incoming event and to encode the response.
The zio-lambda-event module contains Scala types for the events that AWS services send to Lambda, such as API Gateway requests and SQS batches. The zio-lambda-response module contains Scala types for the responses that some AWS integrations expect, such as the API Gateway proxy response.
Where to Go Next
The guides in this section follow the order in which you would build a function:
- Getting Started shows how to write a handler with custom event and response types.
- Event and Response Types lists the AWS event and response types that the optional modules provide.
- Testing Locally shows how to call a handler from a test without deploying it.
- Deployment explains how to package a native binary and deploy it to AWS Lambda, directly or in a container image.
Documentation
Learn more on the ZIO Lambda homepage!
Contributing
For the general guidelines, see ZIO contributor's guide.
Code of Conduct
See the Code of Conduct