Bug: idempotencyHandler
not using registered context when saving in progress
#1482
Labels
bug
Something isn't working
completed
This item is complete and has been merged/shipped
idempotency
This item relates to the Idempotency Utility
Milestone
Expected Behaviour
When using the
idempotentLambdaHandler
,idempotentFunction
decorators, ormakeFunctionIdempotent
function wrapper the underlying idempotency handler should use the Lambda context to determine the remaining milliseconds in the current execution when saving a record as in-progress. This way, if an execution times out while processing it can be handled correctly later on.Current Behaviour
The context is never used in the
IdempotencyHandler
module and theidempotentLambdaHandler
never callsidempotencyConfig.registerLambdaContext(context)
- those are two separate but related issues.As a result, even though the operation is made idempotent, the handler logs this warning:
Code snippet
Steps to Reproduce
in_progress_expiry_attr
value in the DynamoDB TablePossible Solution
No response
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
18.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: