The easiest way to run Restate handlers on AWS Lambda is to use the Restate CDK construct library.
1
Create a Lambda endpoint
Follow the serving docs to create a Lambda endpoint in your Restate service.
2
Build the zip file
Build a zip file containing the application code and dependencies and upload this to AWS Lambda.If you are using the Restate node template, then you can create a zip file with:AWS Lambda assumes that the handler can be found under
index.handler
in the uploaded code.
By default, this is also the case for the Lambda functions developed with the Restate SDK.3
Register the Lambda handler
Register the Lambda function ARN with Restate.
Make sure you first publish a new version of the Lambda function before registering it with Restate.