Deepayan Ghosh
Deepayan Ghosh

Reputation: 185

Is there a way to have different expiration for different idempotency records in aws-lambda-powertools-java?

Is there a way to configure different expiration time for different idempotency records? In the docs, it is possible to use @Idempotent on individual methods which stores the method response as idempotent record. If I want to use this annotation on 3 methods in my lambda, is there any way to have different expiration config for each of these methods? Or is this a global config?

And if possible, how to achieve it?

Link : https://awslabs.github.io/aws-lambda-powertools-java/utilities/idempotency/#customizing-the-default-behavior

Upvotes: 0

Views: 96

Answers (1)

Jerome VDL
Jerome VDL

Reputation: 3526

As of now, the ExpirationInSeconds parameter is "global" for all idempotent methods. There's no way to have different for each of them. You can open an issue explaining your use case and we'll be happy to have a look at it.

Upvotes: 0

Related Questions