Search code examples
amazon-web-servicesjsonpathaws-event-bridge

How to send specific fields from EventBridge input to its target


I am receiving a webhook event on my AWS EventBridge. The event json body is pretty large and I need to transfer only 4 fields to the target. The fields are :

{"browser_ip":"$.detail.payload.browser_ip","created_at":"$.detail.payload.created_at","email":"$.detail.payload.email","shopify_order_id":"$.detail.payload.id"}

I have tried the "Configure Input" --> "Part of the matched eventInfo" option, but it works only when I add just 1 parameter lets say the "$.detail.payload". When I add multiple parameters , it says the input path is invalid. I could not find any example on how to add multiple parts of the matched event info. Is it possible ? If yes then what am I doing wrong?

enter image description here enter image description here Regards, Lina


Solution

  • Found the answer. Instead of using the "part of the event matched" , I used the input transformer as the following :

    enter image description here

    Worked properly . I have the json format in the target.