For infrastructure as code, check out the Restate CDK construct library.
Set up your project
- TypeScript
- Python
- Java
- Kotlin
- Go
Create your Restate + Typescript + Lambda repository
Package and deploy
Build a deployment package containing your application code and dependencies.- TypeScript
- Python
- Java
- Kotlin
- Go
Package your application as a zip file for Lambda:The Lambda handler to setup is
app.handler.Role to invoke the Lambda
When using Cloud, you’ll need to create an IAM Role for Restate Cloud to invoke your Lambda. To set up the role, visit your Restate Cloud Dashboard at Developers > Security > AWS Lambda.Register the service to Restate
In order for Restate to push requests to your Lambda function, you need to register the service to Restate using the CLI or UI:Always register a specific Lambda version (not
$LATEST) to ensure Restate routes requests to a stable deployment.
Check the versioning documentation for more info.CI/CD Automation
You can set up automation to upload a new Lambda version and register new Restate service versions.- TypeScript
- Python
RESTATE_ADMIN_URL: The Admin URL. You can find it in Developers > Admin URLRESTATE_AUTH_TOKEN: Your Restate Cloud auth token. To get one, go to Developers > API Keys > Create API Key, and make sure to select Admin for the roleAWS_INVOKE_ROLE_TO_ASSUME: The role created in the above paragraph to invoke the functionAWS_DEPLOY_ROLE_TO_ASSUME: The role to deploy the function, see below
Github OIDC setup
Github OIDC setup
To configure your account for the Github OIDC provider, run:
Deploy role set up
Deploy role set up
To create the deploy role, head over to the AWS IAM console, and create a new role.The role should have the following Trust policy:And the following permissions:
Self-hosted Restate
Self-hosted Restate
You can use this workflow with Self-hosted Restate as well,
just make sure to correctly set up
RESTATE_AUTH_TOKEN and RESTATE_ADMIN_URL to reach your Restate cluster.