Feature request: Custom Config - Idempotency key required #1295
Labels
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
idempotency
This item relates to the Idempotency Utility
Milestone
Use case
When using the Idempotency utility, users should be able to enforce that an idempotency key is required. When this requirement is expected and not satisfied, the utility should throw an
IdempotencyKeyError
.Solution/User Experience
The
throwOnNoIdempotencyKey
key should be used in conjunction with theeventKeyJmesPath
one:Given the above, the following event payload will be OK:
while the one below will cause an
IdempotencyKeyError
to be thrown (notice :that
order_id
is within theuser
key, and so it won't satisfy the JMESPath expression from above)Reference: https://awslabs.github.io/aws-lambda-powertools-python/2.10.0/utilities/idempotency/#making-idempotency-key-required
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: