-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Use case
Original issue: aws-powertools/powertools-lambda-python#5897
The prefix to the Idempotency key is hardcoded to force a fully qualified name based on the location of the function that uses the decorator. There is no simple way of modifying this behavior in order to make that prefix some static value.
This makes the Idempotency susceptible to future code refactoring. To prevent duplicate handling you can either
Solution/User Experience
A solution is to provide a way to override the key prefix on the makeIdempotent function. An optional argument like keyPrefix that allows a user to provided a fix string. This would allow freedom of refactoring (or even have multiple functions that are controlled by the same idempotency key space).
Considerations:
This should only control the prefix. The standard behavior of appending # would stay intact
Alternative solutions
Python implementation + documentation: https://github.com/aws-powertools/powertools-lambda-python/pull/5898Acknowledgment
- This feature request meets Powertools for AWS Lambda (.NET) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and TypeScript
Metadata
Metadata
Assignees
Labels
Type
Projects
Status