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
Currently, the exception only contains the idempotency key. This key is dynamically determined in Java and is either the primary key (if the user doesn't use composite keys) or the sort key (if the user uses composite keys).
In the composite key configuration this is not enough to identify the item uniquely in DynamoDB and requires the users to have deep knowledge of the Powertools implementation to realize that the primary key is kept fixed which is not a good developer experience.
Related issue in TypeScript: aws-powertools/powertools-lambda-typescript#3691.
When an idempotency operation is already in progress an
IdempotencyAlreadyInProgressException
exception is raised here: https://github.com/aws-powertools/powertools-lambda-java/blob/v2/powertools-idempotency/powertools-idempotency-core/src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyHandler.java#L162.This issue suggests to improve the error message when using a sort key in DynamoDB.
The implementation should not introduce a coupling between data store and idempotency handling!. See discussion: aws-powertools/powertools-lambda-typescript#3691 (comment).
Current behavior
Currently, the exception only contains the idempotency key. This key is dynamically determined in Java and is either the primary key (if the user doesn't use composite keys) or the sort key (if the user uses composite keys).
In the composite key configuration this is not enough to identify the item uniquely in DynamoDB and requires the users to have deep knowledge of the Powertools implementation to realize that the primary key is kept fixed which is not a good developer experience.
Desired behavior
Quoting @dreamorosi from aws-powertools/powertools-lambda-typescript#3691:
There is already an execution in progress with idempotency key: idempotencyKey and sort key: sk
(when using composite key)There is already an execution in progress with idempotency key: idempotencyKey
The text was updated successfully, but these errors were encountered: