AWS “Durable” Lambda Functions


AWS “Durable” Lambda Functions

Sick of having to manually configure AWS Lambda state management for longer, more complex functionality?

AWS released “Durable” functions allows you to code your functions so that they behave in a state-aware manner.

They introduced the concept of steps and callbacks (Not just your regular JS callback before they introduced async and promises).

So when you call their new @aws/durable-execution-sdk-js framework specifying code to be run when the lambda is invoked with a specific callback ID, it will pick up where you left off.

Tracking all this state forever would use up a lot of long-term memory, so, like LLM caching in bedrock, there is a limitation on how long Lambda retains the state.

The good news is that you can configure this in the lambda’s configuration.

My only fear with this is platform lock-in. If you write your lambdas in this way, it would be more difficult to migrate off of AWS if you ever had to. If that is not an issue for you then don’t worry about it.

I plan on doing a longer post on cloud vendor lock-in soon.

Overall, I am excited to give these a try.

PS: The image is AI-generated, but the writing is not.

Let me know what you think of me playing with AI images to spice things up a bit. Like it or hate it?