fix(eventbridge): apply InputPath when delivering events to targets (#335)

This commit is contained in:
Christine Nguyen authored and GitHub committed 2026-04-11 09:52:14 -05:00
1 parent f98abd6e0e
commit 68311a5b47
2 files changed
+35

No files matched your search

@@ -43,6 +43,8 @@ public class EventBridgeInvoker {
String payload;
if (target.getInput() != null) {
payload = target.getInput();
} else if (target.getInputPath() != null) {
payload = applyInputPath(target.getInputPath(), eventJson);
} else if (target.getInputTransformer() != null) {
payload = applyInputTransformer(target.getInputTransformer(), eventJson);
} else {
@@ -71,6 +73,14 @@ public class EventBridgeInvoker {
}
}
String applyInputPath(String inputPath, String eventJson) {
if (inputPath == null || "$".equals(inputPath)) {
return eventJson;
}
String extracted = extractJsonPath(inputPath, eventJson);
return extracted != null ? extracted : eventJson;
}
String applyInputTransformer(InputTransformer transformer, String eventJson) {
String template = transformer.getInputTemplate();
if (template == null) {