0

i have one AWS Batch-Job which is working fine, the scenario is when we want to run the Job we are submitting Batch-Job using python BOTO3 SDK.

Now I want to schedule the Batch-Job in which I can specify the time and it needs to submit Batch-Job on the specified time. I'm using cloud watch right now but, I want to specify some parameters while submitting the Batch-Job.

Any one have idea about any AWS service where i can make schedule event with some parameter and it need to submit Batch-Job with those parameter as a environment variable.

Maulik Harkhani
  • 390
  • 3
  • 12

2 Answers2

0

You could use a Lambda function. You can set up a Lambda function on a schedule, and it can use boto3 to submit a Batch job with the necessary parameters.

Nathan Collins
  • 301
  • 2
  • 5
0

You can use aws event bridge service. You can use cron expression to schedule the event. While creating the event-bridge rule, you can define the parameters that needs to be passed to the job. But if these parameters are constants, you might as well define them in the job definition of aws batch. If these parameters are dynamic, this is where it gets complicated and you may have to provide information.

To create an event bridge rule for aws batch, you can refer following links:

  1. https://docs.aws.amazon.com/batch/latest/userguide/batch-cwe-target.html
  2. https://repost.aws/knowledge-center/batch-parameters-trigger-eventbridge
monte
  • 1,482
  • 1
  • 10
  • 26