Home > Enterprise >  service like aws lambda but for docker container
service like aws lambda but for docker container

Time:09-03

i am looking for a service that works like aws lambda. i would like to deploy a docker container. In this docker container runs for example a web application. the container should be started automatically when a user makes a request to the application. after a certain time, the container should be shut down again automatically.

i haven't found anything yet at digital ocean, azure, etc. what i can do is starting and stopping containers manually or via api, but not via an api gateway. is there already such a solution?

--- AWS App Runner ---

I was trying out the AWS App Runner. I have to scale a minimum size of 1. This means that the container will be online for a whole month. i just want to serve the application for a few hours in a month.

screenshot from app runner

CodePudding user response:

AWS Lambda supports docker images. What you are describing is exactly how AWS Lambda already works.

If you want to use a more traditional docker image that doesn't comply with the Lambda API requirements, you might want to look at AWS App Runner.

CodePudding user response:

Amazon Elastic Container Service (ECS) is designed for this purpose, there are 2 launch types: FARGATE and EC2, I suggest to use FARGATE type for your case. For more information you need to read AWS docs (https://aws.amazon.com/ecs/?nc1=h_ls). There is an article could be useful with your case: https://aws.amazon.com/blogs/compute/using-amazon-api-gateway-with-microservices-deployed-on-amazon-ecs/

  • Related