Skip to content

Feature request: JMESPath powertools functions #2207

Closed
@dreamorosi

Description

@dreamorosi

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

Future readers

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

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 utilityjmespathThis item relates to the JMESPath Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions