is there an auto scaling container product?

0

hello everyone, i'm noob, my question is really simple. Does AWS have a product where i can deploy docker containers to but shuts down if not in use, so i don't get charged as much when idle? I imagine the trade-off would be that there would be cold starts if it has been idle for a while but I'm okay with that. I'd also like to do as little configuration as possible.

profile picture
asked a month ago399 views
4 Answers
3

Hello! Yes, AWS offers a service called AWS Fargate that allows you to deploy Docker containers without managing the underlying infrastructure. While Fargate doesn't shut down containers automatically when they're not in use, you can control the number of running tasks (containers) based on demand using AWS Auto Scaling.

With Auto Scaling, you can set up policies to scale your Fargate tasks based on metrics like CPU utilization or request count.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
1

Hi,

You can also use AWS Lambda functions, which allows to package your code and dependencies as a container image.

As described on the AWS documentation, AWS Lambda is a compute service that lets you run code without provisioning or managing servers. All you need to do is supply your code in one of the language runtimes that Lambda supports and AWS will perform all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling (up to zero on idle), and logging.

However, AWS Lambda functions are not suitable for long running processes, since execution time is limited to 15 minutes.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
1

ECS Tasks is another option than a full blown ECS service, you can start tasks when needed and you can get the task to exit once completed

profile picture
EXPERT
answered a month ago
0

Hello,

Just to add on top of all the already provided answers, AppRunner can address your requirements:

  1. Automatic Scaling: AppRunner automatically scales your application instances up or down based on the incoming traffic. When there is no traffic, it can scale down to zero instances, effectively shutting down your application when not in use. This means you're not charged for idle instances, helping you save costs.

  2. Cold Starts: As you mentioned, when your application needs to start after being idle, there will be a cold start, which may result in slightly longer response times for the first few requests. However, AppRunner aims to minimize the cold start time by keeping your application's environment warm and ready to handle new requests quickly.

  3. Minimal Configuration: AppRunner is designed to be a fully managed service, requiring minimal configuration on your part. You can simply provide your Docker container image, and AppRunner takes care of provisioning the compute resources, load balancing, and other infrastructure components required to run your application.

Additionally, AppRunner integrates with other AWS services like AWS CodeDeploy for seamless deployment making it easier to manage your containerized applications.

To use AppRunner, you can simply create an AppRunner service in the AWS Management Console or through the AWS CLI or SDKs. You can specify your Docker container image and any required configurations, and AppRunner will handle the deployment and management of your application.

Overall, AppRunner is a great choice if you want a fully managed service for deploying Docker containers with automatic scaling and cost optimization features, while minimizing the configuration and management overhead.

Please find here the AWS AppRunner documentation.

profile pictureAWS
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions