You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create the idempotency key on entry and save it (in say self.idempotency_key)
Use copy.deepcopy() when saving self.data which forces a pass by value and gets the result of hash function stable
The former solution would be more performant, the latter less code.
Steps to Reproduce
Add the idempotency decorator to any lambda function, update the event data, ie: event.popitem() and observe that 2 DDB documents were written of which one is stuck in INPROGRESS until it's TTLed
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
{"label"=>"3.8"}
Packaging format used
{"label"=>"PyPi"}
Debugging logs
No response
The text was updated successfully, but these errors were encountered:
Expected Behaviour
A function that (inadvertently) updates the event it has received should execute successfully, and have one idempotency document written.
Current Behaviour
A function that (inadvertently) updates the event it has received executes successfully, but has two documents corresponding to it's execution:
Code snippet
Possible Solution
A few options:
self.idempotency_key
)copy.deepcopy()
when savingself.data
which forces a pass by value and gets the result of hash function stableThe former solution would be more performant, the latter less code.
Steps to Reproduce
Add the idempotency decorator to any lambda function, update the event data, ie:
event.popitem()
and observe that 2 DDB documents were written of which one is stuck in INPROGRESS until it's TTLedAWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
{"label"=>"3.8"}
Packaging format used
{"label"=>"PyPi"}
Debugging logs
No response
The text was updated successfully, but these errors were encountered: