1

I am looking for a service that is similar to AWS's Lambda or GCP's Cloud Functions but allows for the running of arbitrary containers.

The use case is that at random times I need to run a Docker container. It might be that the container does not need to run for several days or weeks. The application is cost-sensitive so something like GCP's App Engine (flexible) which runs the containers all the time is not appropriate.

Is there something in Amazon Web Services or Google Cloud Platform that can do this?

user35042
  • 2,601
  • 10
  • 32
  • 57

1 Answers1

1

Look at AWS Fargate - Run containers without managing servers or clusters

On Fargate you can run either

  • Services which are always-on containers, e.g. to serve an API backend, or
  • Tasks which are on-off processes where the container completes its job and exits.

In our project we run around 180 Tasks every morning for some parallel batch processing, the containers run for only ca 10 min each. We only pay for the actual runtime of the containers, no need to spin up an instance beforehand, no need to run it all the time as a Service. Simply start the container and start paying and when it's done with its job it exits and you stop paying.

There are various CPU and RAM configurations you can choose from which affect the price (price is per hour but billed per second).

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81
  • Good answer. I'll add that Fargate is more expensive than other container options if you're running containers 24/7, but for occasional use it's probably a good option. – Tim Dec 03 '18 at 08:04
  • @Tim true, some cost analysis for Fargate vs EC2 is in my answer [over here](https://serverfault.com/questions/939072/is-fargate-a-good-fit-for-independent-containers-that-have-low-resource-utilizat/939074#939074). – MLu Dec 03 '18 at 08:10