Have some monte carlo simulation code with these characteristics

Run time: 1- 60 minutes

Memory: up to 8 GB

Run frequency: 2-3 times per day

Required latency: Run time + 5-10 minutes is fine

Simulation kicked off by: Django webapp

I would love to use lambda and not have to manage it but the 15 minute limit disqualifies it for me (even though many of the simulation jobs are less than 15 minutes, not all). ECS seems like a contender (dockerizing this app is easy). Maybe simples option is EC2? I’ve never written code to spin up EC2 instances, so if that’s not terrible then it might be cheaper/simpler.

Any thoughts? The Django webapp will be running 24/7 but I was trying to find a way that the simulation engine could only turn on when needed since it’ll need more resources than the Django server.

EDIT: If it wasn’t clear I do want the resource to spin down/go away after the simulation ends. Still reading about how that can be done the easiest.

submitted by /u/aws_hole
[link] [comments]