docs(event-handler): update custom middleware example to use Store API#5145
Merged
dreamorosi merged 1 commit intomainfrom Mar 30, 2026
Merged
docs(event-handler): update custom middleware example to use Store API#5145dreamorosi merged 1 commit intomainfrom
dreamorosi merged 1 commit intomainfrom
Conversation
411e319 to
bd97aa8
Compare
Replace module-level mutable state with the Store API (reqCtx.set/get) using a correlation ID middleware example. This demonstrates the recommended pattern for managing per-request state in Lambda. Closes #5103
bd97aa8 to
0fc2c43
Compare
|
dreamorosi
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Changes
Replace the custom middleware example that used module-level mutable state with a correlation ID
middleware that uses the Store API (
reqCtx.set/reqCtx.get). This demonstrates the recommendedpattern for managing per-request state in Lambda and avoids state leaking across warm invocations.
Issue number: closes #5103
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.