Configuration for the idempotency feature.

Constructors

Properties

eventKeyJmesPath: string

The JMESPath expression used to extract the idempotency key from the event.

Default

''
expiresAfterSeconds: number

The number of seconds the idempotency key is valid.

Default

3600 (1 hour)
hashFunction: string

The hash function used to generate the idempotency key.

jmesPathOptions: JMESPathParsingOptions

Options for parsing JMESPath expressions.

By default, you can use any of the JMESPath built-in functions as well as the custom functions provided by the @aws-lambda-powertools/jmespath package.

lambdaContext?: Context

The lambda context object.

maxLocalCacheSize: number

The maximum number of items to store in the local cache.

Default

1000
payloadValidationJmesPath?: string

The JMESPath expression used to extract the payload to validate.

throwOnNoIdempotencyKey: boolean

Throw an error if the idempotency key is not found in the event. In some cases, you may want to allow the request to continue without idempotency. If set to false and idempotency key is not found, the request will continue without idempotency.

Default

false
useLocalCache: boolean

Use the local cache to store idempotency keys.

See

LRUCache

Methods