Is there an additional guidance to support events and targets for eventbridge ?
Hi,
I want to add support to notify events from batch to event bridge and I would like to know if there is an additional guide (I'm checking the notification module on s3 as source of inspiration) to support these kind of notifications.
Thanks.
Hi @juanblo! There is no specific documentation/guidance on how to implement this. The original PR where we implemented this feature may offer some insight though: https://github.com/getmoto/moto/pull/5169/files
@bblommers Thanks for the reference to PR. I'll take it as a guide to support some batch events/targets.
I take on this task!
Memo:
- Job-status change events are sent from AWS Batch to Eventbridge. If a previously submitted job's status changes, an event is invoked. These events are classified as job state change events.
| Jb Status | Description | PR |
|---|---|---|
SUBMITTED |
A job that's submitted to the queue. If there are dependencies, the job is moved to PENDING. If there are no dependencies, the job is moved to RUNNABLE. |
|
PENDING |
A job that resides in the queue and isn't yet able to run due to a dependency on another job or resource. After the dependencies are satisfied, the job is moved to RUNNABLE |
|
RUNNABLE |
Jobs in this state are started as soon as sufficient resources are available. However, jobs can remain in this state indefinitely when sufficient resources are unavailable. | |
STARTING |
These jobs have been scheduled to a host and relevant container initiation operations are underway. After the container image is pulled and the other container is up and running, the job transitions to RUNNING |
|
RUNNING |
The job is running as a container job on an Amazon ECS container instance within a computing environment. If the job associated with a failed attempt has any remaining attempts in its optional retry strategy configuration, the job is moved to RUNNABLE again. |
|
SUCCEEDED |
The job has successfully competed with an exit code of 0. |
|
FAILED |
The job has failed all available attempts. |
Ref: https://docs.aws.amazon.com/batch/latest/userguide/batch_cwe_events.html