API Gateway HTTP Streaming Endpoint - kinesis proxy Resource example

Hey Crew,

I have a bit of a noodle scratcher and I’m surprised there isnt more discussion about it.

I have a metrics service that is great. Its lean and efficient and currently provides data to very basic dashboard elements. So imagine one of our merchants signs in, it tells them that in the last 7 days they have signed 10 new customers, performed 5124 transactions with 24 failed payments. The service allows you to query on any date range and aggregate etc, really nice.

The tables are structured to store the metrics sliced into hours which gives us a nice set of data to work from.

We now would like to add some more complex real time visualisations of that data. So we have a little d3 widget that we can use to graph the time series of this data and update in real time if the user chooses that range. I just need a stream to feed elements into an array and d3 does the rest.

The question is, how do we serve that data? I can see that you can connect Kinesis to the APIG which will provide a HTTP address that the client can subscribe to and receive the data via a HTTP stream.

I can see this can be done via the console but I was wondering if anyone has done this using a custom Resource or using the regular event description in the serverless file?

Any guidance would be appreciated.

Cheers
b

1 Like

API Gateway websockets - serverless

reading this article reminded me of this post last year.