Hey folks! I'm pretty new to AWS—so far I've just messed around with Lambda functions and S3 using Python. Recently, my superiors at work pointed out a Python program for AI object detection that runs on a GCP Virtual Machine. It's not in use constantly but needs to be available whenever a client wants to process a video from S3.
They suggested using AWS with Terraform to handle infrastructure. The idea is to only run the AI program when needed, instead of keeping it constantly active. I'm thinking of creating a new service that generates the infrastructure, runs a simplified version of the AI program, then tears it all down when it's done.
The intended workflow would look something like this:
1. The main program waits for TCP socket connections from clients.
2. When a client wants to run an algorithm on a video, it sends the file location in S3 along with additional parameters.
3. The main program sets up the infrastructure, runs the AI detection, downloads the video, processes it, sends some emails when complete, and uploads a new video with annotations.
4. Once finished, the infrastructure gets destroyed.
There's also a similar program for processing RTP livestreams, which would require open IPs and ports. One alternative I'm considering is to change how we receive the stream by using a mediamtx server instead of direct RTP.
I'm unsure if this approach is viable or if there's a better way to do this. Any insights or suggestions would be really appreciated!
1 Answer
Honestly, I think the approach you’re considering might not be the best. Instead of spinning up and tearing down the whole infrastructure each time, you might want to rethink your architecture. Consider using something like ECS or EKS, which lets you trigger tasks based on requests without having to manage everything manually. It could save you a lot of hassle!
Right? A serverless approach could simplify your workload a ton!

I agree, it's definitely something to consider. I initially ruled out Lambdas since they can't handle heavy processing, but I'll look into ECS and EKS. Thanks!