-
Notifications
You must be signed in to change notification settings - Fork 154
feat(idempotency): add custom JMESPath functions #2364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Converting back to draft to fix an error appearing in the examples app. |
…ertools/powertools-lambda-typescript into feat/idempotency_custom_jmespath
Integration tests passing: https://github.com/aws-powertools/powertools-lambda-typescript/actions/runs/8701862065 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good, just minor comment on instantiation of PowertoolsFunction()
|
Description of your changes
This PR introduces support for custom JMESPath functions to the Idempotency utility, addressing one of our most requested features (the 5th to be precise).
With this new feature customers can use the
powertools_json()
,powertools_base64()
, andpowertools_base64_gzip()
custom functions to deserialize encoded payloads and use the values within them as idempotency key.This is especially useful when working with API Gateway or SQS messages among others, since oftentimes the customer defined part of the payload is encoded as JSON stringified object or base64 encoded value:
The feature is added by having the Idempotency utility take a dependency on the newly released
@aws-lambda-powertools/jmespath
package and replacing the existing, and more limited,jmespath
module.The PR also adds the new
@aws-lambda-powertools/jmespath
utility to the Lambda Layer replacing the existingjmespath
dependency.Related issues, RFCs
Issue number: #1298
Checklist
Breaking change checklist
Is it a breaking change?: NO
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.