Submit an AWS Job batch using EventBridge when Job Queue and/or Compute Environnement are DISABLED

0

I tried to find a solution somewhere but didn't find a response for my case. I already have a Compute Environment, Job Queue, and Job Definition created with the required configuration. I can successfully submit a job manually, and it works as wanted. My Job Queue and Compute Environment go DISABLED automatically when they are Idle, I think that's how AWS Batch works to optimize costs (maybe ?) I configured a rule (cron) in EventBridge to submit a job (using the job queue, and job definition mentioned above), and it works fine, but I have to ENABLE manually the Compute Environment and Job Queue every time (which is not something I wanted), I thought of creating another rule in EventBridge to run a lambda function that enables my resources before submitting the job, but I think that is overengineered for such a simple task, I think I'm missing something here, can you give me suggestions, or correct me if I'm missing something in this simple use case? Thanks!

preguntada hace un año298 visualizaciones
1 Respuesta
0

I am not very familiar with AWS batch, but if you need to enable something prior to submitting the job, I would use Step Functions. The state machine will be invoked by EventBridge. It will use the AWS Batch APIs to check the status. If needed, it will enable it, and then it will submit the job.

profile pictureAWS
EXPERTO
Uri
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas