Skip to content

Feature request: Custom Config - Payload subset for idempotency #1297

Closed
@saragerion

Description

@saragerion

Use case

When using the Idempotency utility, customers can specify a JMESPath expression to filter/select a portion of the data/payload to be used for idempotency. This is useful when dealing with more elaborate payloads, where parts of the payload always change.

Solution/User Experience

import { IdempotencyConfig } from '@aws-lambda-powertools/idempotency';

const config = new IdempotencyConfig({
  eventKeyJmesPath: 'foo.bar', // selects the bar key within the foo object
});

Users can use JMESPath expressions also to filter the portion of payload to use for validation:

import { IdempotencyConfig } from '@aws-lambda-powertools/idempotency';

const config = new IdempotencyConfig({
  payloadValidationJmesPath: 'foo.bar', // selects the bar key within the foo object
});

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityidempotencyThis item relates to the Idempotency Utility

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions