Accessing responses from EventBridge API Destination calls

0

When an event payload is routed to an EventBridge API Destination target API how does one access responses returned from the target API?

EventBridge API Destination provides the means to make GET requests to an external API. By definition a response is expected. How does one access the response payload or even the HTTP response code?

I have successfully implemented and tested each of the HTTP verbs available in EventBridge API Destinations. I am able to verify the state of the data in the target API is successfully changed when PUT, POST, & DELETE requests are routed through the API Destination.

However, neither the response body nor the response code returned from the target API appear to be accessible or available for further processing. How does one access the response body and/or the response code returned by the target API successful invocation of an API Destination request?

Thanks

asked 12 days ago83 views
1 Answer
1
Accepted Answer

Hello.

As far as I know, it is not possible to check the response when executing external APIs using EventBridge API Destinations.
If you have a requirement to check and process the response from executing an API, I think you need to use Lambda as the EventBridge target.
If you use Lambda, it should be possible to execute the API and get the response.

profile picture
EXPERT
answered 12 days ago
profile picture
EXPERT
reviewed 12 days ago
profile pictureAWS
EXPERT
Uri
reviewed 12 days ago
  • Correct. API Endpoints are for notification (as with any other target). EventBridge doesn't care what the response is. It only cares if there is an error response or no response within 5 seconds, so it knows it needs to retry.

  • Thank you for the quick response, Riki & Uri.

    Your responses confirm my current solution. I was hoping EventBridge API Destinations had gained this functionality over time since the last time I checked.

    The few lambda I have remaining are largely those needed to make calls to external API's and forward the responses back to EventBridge or return them to next step in a state machine for further processing.

    Without the response body or even the response|status code this severely limits the utility EventBridge API Destinations offer.

    So, I will accept these as the answer.

    Respect,

    Rod

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions