Start with what must survive an event
When continuously running, stateful Flink applications fit better than Lambda invocations that process events and keep persistent state externally. · associate
A stateless computation needs only its current input: converting a measurement from Celsius to Fahrenheit does not require earlier measurements. A stateful computation retains information across inputs, such as a running count or the measurements contributing to a time-window average.
Amazon Managed Service for Apache Flink runs a continuous stream-processing application. Flink can manage working state as part of that application, so later records can update earlier computations without application code loading and saving every intermediate value in a separate database.
AWS Lambda runs processing code in invocations, which can receive individual events or batches. For the event-processing model compared here, persistent business state belongs outside the invocation, such as in DynamoDB. Lambda can therefore participate in a stateful application even though its invocation memory is not the durable state store.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.