Fargate allows to run a docker container, for how long you need it. Just keep in mind it takes around minute to start it.
You can start container from lambda, you can make trigger lambda from container, with usual AWS SDK calls.
I would need a constant stream, non stop 24/7 instead of invoking lambda every X seconds/minutes.
I already have a whole app written in Lambda, I’m just wondering if for some of the jobs Fargate would be a better choice. Thanks for giving me a direction, I’ll read more about it.
Yes. But the “direct” use case is only useful for short “request reply” situations where Lambda makes a request to something listening on websockets, then lambda reads the reply and shuts off. Lambda isn’t useful for “run this all the time” websockets server.
On the other hand, you CAN fire off a lambda when you get a message using either API GW or IOT. (I think they both do it, but at least one can do it.) This is useful for the OTHER side of request reply, where a browser makes a request over WebSockets and lambda runs and generates a reply.