A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/aws-powertools/powertools-lambda-typescript/issues/1644 below:

Select payload subset without JMESPath · Issue #1644 · aws-powertools/powertools-lambda-typescript · GitHub

Use case

Executing jmespath on every request just to select part of the payload seems like overkill. It would be easier to express this selector with a simple function instead and would avoid the overhead of jmespath

Solution/User Experience

Allow passing a function to select the idempotency key instead of using jmespath

The example from the docs could be easily expressed as

const config = new IdempotencyConfig({
  eventKeyFn: payload => payload?.headers?.['X-Idempotency-Key'],
});

Ideally make jmespath an optional dependency too.

Alternative solutions

No response

Acknowledgment Future readers

Please react with 👍 and your use case to help us understand customer demand.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4