Run cron job in AWS

0

Hi Team,

We are planning to run a cron job in AWS, The job will run 60 minutes every day. So we need best AWS resource to do it. 1) If we use EC2, we need to spend money for rest of 23 hours. 2) If we use lambda, it will time out after 25 min 3) AWS batch also not suitable it seems.

So please suggest best option for us here

Regards, Rajesh B

질문됨 일 년 전548회 조회
2개 답변
0
수락된 답변

Given that you have ruled out the possibility of using AWS Batch and Lambda does not meet your requirements in terms to total time for execution, there are 2 possible options:-

1 ECS Scheduled Tasks - This would require code to be containerized (docker)

2 Automate starting and stopping of EC2 instances - This solution helps reduce operational costs by stopping resources that are not in use and starting resources when their capacity is needed. Please refer to the below link for more information:- https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/solution-overview.html

AWS
답변함 일 년 전
0

Without knowing more details about the job you're trying to run this is a difficult question to answer. However, a few things to think about:

If the task has to run on EC2, then why not use instance scheduler to run the instance and then shut it down when it is finished? That way you're not paying for the extra 23 hours a day.

An alternative might be to run the task in a container on Fargate and use EventBridge to schedule it.

profile pictureAWS
전문가
답변함 일 년 전
  • We run the job for report generation on existing data.

    How Fargate works. How the billing will happen for Fragate. I am new to Fragate.

  • Fargate runs containers on demand; you pay for the resources consumed when the containers are running. https://aws.amazon.com/fargate/pricing/

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠