We replaced 400 lines of StepFunctions ASL with 40 lines of TypeScript by making Lambdas suspendable
Blog post from Restate
A new approach to building complex business processes on AWS Lambda involves using suspendable functions implemented with durable async/await in the open-source runtime Restate, allowing developers to write sequential code with RPC-style service calls without relying on workflow DSLs or plumbing events. This method simplifies the orchestration of serverless business processes by leveraging Lambda's operational benefits and AWS Step Functions' reliability, overcoming the limitations of typical service-oriented architectures that can result in high costs due to execution-time billing. By using Restate, developers can suspend and resume Lambda functions, ensuring that only one Lambda runtime is active at a time, which reduces execution costs and guarantees that business processes run to completion without redoing work. The approach eliminates the need for separate workflow and service code, enabling the creation of maintainable, typed, imperative code that describes entire processes while retaining the advantages of serverless deployment. Restate is available as both an open-source project and a managed service, allowing developers to deploy it on various platforms, including AWS Lambda and Fargate, to balance cost and performance effectively.