Description
Use case
As an added value for the Powertools JMESPath utility we will add some custom functions that can be used in JMESPath expression that are especially useful in the context of AWS Lambda.
The JMESPath built-in functions support number (i.e. avg
, min
, ceil
, etc.), string (starts_with
, contains
, etc.), object (keys
, max_by
, etc.), and list (sort
, values
, etc.) operations, however when working with Lambda customers often receive payloads that are encoded.
By adding custom functions that decode part of the payload using common encodings, customers will be able to use JMESPath expressions on the entire payload.
Solution/User Experience
We will start with supporting three types of custom functions as they cover most of the AWS events:
powertools_json
powertools_base64
powertools_base64_gzip
Customers should also be able to extend the functionality of the utility and define their custom functions easily.
All types, classes, and functions should be documented and exposed to customers via API docs.
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status