Hacker News Re-Imagined

Ask HN: Can I trigger events off of outbound HTTP requests from an EC2 instance?

Imagine an old app. Let's say, hypothetically, that it is 9 or 10 years old, it has enormous amounts of tech debt. It makes thousands of API calls to 3rd party APIs, and stores some of the data in the database. The code is brittle, and full of bugs. We are afraid to touch it, because it is so old and badly written. If we wanted to start logging every outbound API call, we could re-write the code, but that would take a year or two. I'm trying to get the job done in a day or two. I'm wondering, is there a way to route the outbound request, through some AWS service, such that I can trigger some event for each outbound request? If I could route every outbound request through some proxy, then the proxy could record every outbound request, and I wouldn't have to touch the code. But how exactly could I arrange to put such a proxy between the EC2 instance and the outside world?

  • 1 points
  • 13 days ago

  • @lkrubner
  • Created a post

Ask HN: Can I trigger events off of outbound HTTP requests from an EC2 instance?


@yuppie_scum 12 days

Replying to @lkrubner 🎙

I’m thinking it would involve routing tables, maybe into API Gateway triggering a lambda?

Reply


@verdverm 13 days

Replying to @lkrubner 🎙

Better question for StackOverflow

Reply


About Us

site design / logo © 2022 Box Piper