Closed
Description
Use case
Description of the feature request
Problem statement
Library users want to add idempotency attribute to the Lambda handler.
Check the design spec for details.
Summary of the feature
- Provide two interface (Middy middleware and decorator ) to make a Lambda handler idempotent
- Cover edge cases described in the design spec
- I can pass the persistence layer as a parameter (that implements the
PersitenceLayer
interface)
Code examples
See the design spec
Story Checklist (for tracking progress)
- As a developer, I would like to make my Lambda handler idempotent. My handler use TypeScript class and I want to wrap the handler with
@idempotent_function()
decorator. - As a developer, I would like to make my Lambda handler idempotent with Middy middleware
- As a developer, I would like to switch my persistence layer to a different implementation, besides the default one (DynamoDB)
Definition of done
- Include unit tests with 100% code coverage (or as much as it makes sense)
- Code documentation (TS doc) on classes and public methods
Related issues, RFCs
Solution/User Experience
See #447
Alternative solutions
N/A
Acknowledgment
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Python, Java