You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Extract Event IDs from EventBridge and set as correlation ID (list value as there could be N events)@logger.inject_lambda_context(correlation_id_path="Records[*].powertools_json(body).id")@metrics.log_metrics(capture_cold_start_metric=True)@tracer.capture_lambda_handlerdeflambda_handler(event, context: LambdaContext):
returnTrue
Possible Solution
Use jmespath_utils instead of jmespath.search like the rest of Powertools utilities (Logger, Idempotency, Validation).
Expected Behaviour
Able to deserialize JSON string and extract given field
Current Behaviour
UnknownFunctionError
exception by JMESPath when using any of the Powertools custom functions: https://docs.powertools.aws.dev/lambda/python/latest/utilities/jmespath_functions/#extracting-dataCode snippet
Possible Solution
Use
jmespath_utils
instead ofjmespath.search
like the rest of Powertools utilities (Logger, Idempotency, Validation).Steps to Reproduce
Call this function with the following event:
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: