Skip to content

How to use idempotency with path parameters #3583

Closed Answered by dreamorosi
tknisch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @tknisch, thanks for opening this discussion.

To account for multiple fields, you can use square brackets and list all the fields you want to extract from the payload, in this case it would be [requestContext.http.path, powertools_json(body)] or [rawPath, powertools_json(body)] depending on which field you want to use to get the path.

For future reference, if you want to test different types of expressions, you can import directly the JMESPath function used by the Idempotency utility and try expressions directly, for example:

import { search } from '@aws-lambda-powertools/jmespath';
import { PowertoolsFunctions } from '@aws-lambda-powertools/jmespath/functions';

const extracted = search(

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tknisch
Comment options

@dreamorosi
Comment options

@tknisch
Comment options

Answer selected by dreamorosi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants