java.lang.Object
software.amazon.lambda.powertools.idempotency.Idempotency

public class Idempotency extends Object
Holds the configuration for idempotency:
  • The persistence layer to use for persisting the request and response of the function (mandatory).
  • The general configuration for idempotency (optional, see IdempotencyConfig.Builder methods to see defaults values.

Use it before the function handler (RequestHandler.handleRequest(Object, Context)) get called.
Example:
     Idempotency.config().withPersistenceStore(...).configure();
 
  • Method Details

    • getInstance

      public static Idempotency getInstance()
    • registerLambdaContext

      public static void registerLambdaContext(com.amazonaws.services.lambda.runtime.Context lambdaContext)
      Can be used in a method which is not the handler to capture the Lambda context, to calculate the remaining time before the invocation times out.
      Parameters:
      lambdaContext -
    • config

      public static Idempotency.Config config()
      Acts like a builder that can be used to configure Idempotency
      Returns:
      a new instance of Idempotency.Config
    • getConfig

      public IdempotencyConfig getConfig()
    • getPersistenceStore

      public BasePersistenceStore getPersistenceStore()