DEV Community

Discussion on: Amazon EventBridge API Destinations with parametrized endpoint URL and Mailchimp integration

Collapse
 
seththomas profile image
Seth Geoghegan

Great post! The most thorough coverage of the topic I've seen to date, thanks for taking the time to put it together.

Based on my reading of this topic, it sounds like API Destinations only provide one-way communication with 3rd party APIs. Every example I've seen so far is sending event notifications to external APIs (e.g. a POST request to a ticketing system, sending mail, etc). None of these examples show how to fetch data from a 3rd party API in response to an event. Do you know if this is possible?

Here's some context to why I'm asking. My application ingests webhook notifications from activity tracker APIs (e.g. Strava, Fitbit, etc). The events themselves are just notifications that an activity happened (time, event ID, user id). To get more information from the API, I need to issue a GET request to the 3rd party API and process the response. I'd love if I could use Event Bridge and API Destinations to automatically fetch data in response to webhook events being sent into my system. However, this doesn't sound possible with the current EventBridge offering.

Collapse
 
pzubkiewicz profile image
Pawel Zubkiewicz

Thank you Seth.

You're correct. This mechanism works in just a one way (from AWS to a 3rd party endpoint).

As it goes about your application you may research AWS API Gateway service. This example serverlessrepo.aws.amazon.com/appl... shows how to implement a webhook that sends info to SNS. You may replace SNS with EventBridge to have single messaging channel.

Collapse
 
rcoundon profile image
Ross Coundon

We're just investigating this as a means of rate limiting requests to a 3rd party API from lambda.
There is an option in the API Destination HTTP Method for GET requests, does this mean it is possible to retrieve data using this method?