-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilityidempotencyThis item relates to the Idempotency UtilityThis item relates to the Idempotency Utility
Milestone
Description
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 (wrapper function and decorator) to make a Lambda idempotent
- Cover edge cases described in the design spec
- Provide a DynamoDB persistent layer for keeping idempotency records
- Provide a base class for persistent layer. Library users can extend to make implementation on different storage.
Code examples
See the design spec
Story Checklist (for tracking progress)
- As a developer, I would like to implement the Dynamo persistence layer
- Dynamo specific interaction definitions
- As a developer, I would like to implement the persistence base layer
- Base class that will handle creating the hash, expiry date, and orchestration to the implementing subclass persistence layer
- As a developer, I would like to implement the idempotency handler/wrapper
- Defines core idempotency logic: saving in progress records conditionally, calling the function that is being made idempotent via a wrapper/decorator, updating idempotency records when complete, deleting idempotency records in case of error
- Check if we can remove the
unknown
type (See comment https://github.com/awslabs/aws-lambda-powertools-typescript/pull/1110/files/0ec830102bce74a6e423cb29dc102ca47f8fc1fe#r1009618833)
Definition of done
- Include unit tests with 100% code coverage
- Code documentation (TS doc) on classes and public methods
Related issues, RFCs
Metadata
Metadata
Assignees
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilityidempotencyThis item relates to the Idempotency UtilityThis item relates to the Idempotency Utility