By using AWS re:Post, you agree to the Terms of Use
/Running short-lived tasks on AWS Lightsail Containers/

Running short-lived tasks on AWS Lightsail Containers

0

Hello!

I wish to run some short lived tasks on AWS Lightsail Containers. The container boots, performs some work which may take anywhere from a handful of seconds to serveral hours, and then it exits once complete.

Is AWS Lightsail Containers suitable for this workload? In the documentation I got the impression that it was intended for long-lived HTTP services that do not terminate.

Thanks, Louis

3 Answers
0

AWS App Runner is more suitable for the use case you specified.

answered 3 months ago
  • I am not sure App Runner would be the best choice for this. It sounds more like a batch-y type of workload and App Runner doesn't work like that (it's a strict request/response service where if there is no explicit http request it just "shuts down" - so to speak)

  • Thanks for the comment Jason, but I'm not looking for recommendations, I'm looking for information on specifically Lightsail. Thank you

0

Really it comes down to pricing. With Lightsail you are paying month-to-month regardless of usage. If you used something serverless like Fargate, or as Jason mentioned, AppRunner, you are paying by usage.

answered 3 months ago
  • Hi John. I'm not interested in pricing here, I'm looking for information on whether Lightsail Containers supports workloads that are intended to exit. i.e. Is it possible to have Lightsail not restart a container once it exits successfully as that would in this case be the intended behaviour. Thank you

  • "Is AWS Lightsail Containers suitable for this workload?" - Yes. "In the documentation I got the impression that it was intended for long-lived HTTP services that do not terminate." - No? https://aws.amazon.com/blogs/aws/lightsail-containers-an-easy-way-to-run-your-containers-in-the-cloud/ "Under the hood, Lightsail is powered by Amazon Elastic Compute Cloud (Amazon EC2), Amazon Relational Database Service (RDS), Application Load Balancer, and other AWS services..." - Lightsail is just an added administration layer on top of existing services.

0

Hi -

To directly address your question on Lightsail, generally when we approach the issue, it's two factors that is important (regardless of solutions you choose), among other things (like security, flexibility and access to other AWS resources).

  1. cost. Lightsail is a Virtual Private Server. What is means is you pay a fixed price for the amount of resources you provision regardless of your node utilization. In your case this is very important. It's a moot question to ask whether Lightsail is suitible for your use case because Llightsail for sure will be suitable for the usecase as long as you provisioned enough nodes to handle peak load. However generally if you consistently have low node utilization, you are leaving money on the table so you might want to visit other services. Sorry I might not have elaborated more in detail in my previous answer but additional services such as AWS Batch (with Fargate) or even a queue based solution might be a better fit and deliver better cost structure for what you need.

  2. scalability. Almost all AWS solutions can be architected to scale. However, serverless solutions such as Fargate will make the tasks simpler.

answered 3 months 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