- Newest
- Most votes
- Most comments
EventBridge doesn't support wildcards or regex patterns directly in the InputPathsMap for input transformers. The InputPathsMap requires exact JSON path expressions to extract specific values from your events.
Refer: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_InputTransformer.html
Please consider the following workarounds, if that works for your use-case:
- Create separate mappings for each version you need to support:
"source_v15": "$.detail.contexts_io_upheal_session_15[0].source",
"source_v16": "$.detail.contexts_io_upheal_session_16[0].source"
-
Use an input transformer to transform your events before they reach their destination. Input transformers allow you to map specific EventBridge fields to corresponding attributes in your target format.
-
Consider using a more generic event pattern to catch all relevant events, and then handle the version-specific processing in your target Lambda function or other service.
For example, you could use an event pattern like:
{
"detail-type": ["YourDetailType"],
"source": ["your-source"]
}
This would match all events of the specified detail-type and source, regardless of the session version, and then your target could handle the version-specific processing.
Sources
Sending and receiving CloudEvents with Amazon EventBridge | AWS Compute Blog
Creating event patterns in EventBridge - Amazon EventBridge
answered a year ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
