Closed
Description
Expected Behaviour
The idempotency utility should only cache the results from the persistence layer if the retrieved record passes payload tampering validation.
Current Behaviour
The results from the persistence layer are always written to the cache, even if it later fails tampering validation. This should be the other way around.
Code snippet
https://github.com/aws-powertools/powertools-lambda-python/blob/8ed384d6b58819843bcd9df8caeefa9e7001e450/aws_lambda_powertools/utilities/idempotency/persistence/base.py#L386-L388
Possible Solution
Change the logic
Steps to Reproduce
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.12
Packaging format used
PyPi
Debugging logs
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Shipped