Resource: Job state change events - Amazon Batch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Resource: Job state change events

Anytime that an existing (previously submitted) job changes states, an event is created. For more information about Amazon Batch job states, see Job states.

Note

Events aren't created for the initial job submission.

Example Job State Change Event

Job state change events are delivered in the following format. The detail section resembles the JobDetail object that's returned from a DescribeJobs API operation in the Amazon Batch API Reference. For more information about EventBridge parameters, see Events and Event Patterns in the Amazon EventBridge User Guide.

{ "version": "0", "id": "c8f9c4b5-76e5-d76a-f980-7011e206042b", "detail-type": "Batch Job State Change", "source": "aws.batch", "account": "123456789012", "time": "2022-01-11T23:36:40Z", "region": "us-east-1", "resources": [ "arn:aws-cn:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8" ], "detail": { "jobArn": "arn:aws-cn:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8", "jobName": "event-test", "jobId": "4c7599ae-0a82-49aa-ba5a-4727fcce14a8", "jobQueue": "arn:aws-cn:batch:us-east-1:123456789012:job-queue/PexjEHappyPathCanary2JobQueue", "status": "RUNNABLE", "attempts": [], "createdAt": 1641944200058, "retryStrategy": { "attempts": 2, "evaluateOnExit": [] }, "dependsOn": [], "jobDefinition": "arn:aws-cn:batch:us-east-1:123456789012:job-definition/first-run-job-definition:1", "parameters": {}, "container": { "image": "137112412989.dkr.ecr.us-east-1.amazonaws.com/amazonlinux:latest", "command": [ "sleep", "600" ], "volumes": [], "environment": [], "mountPoints": [], "ulimits": [], "networkInterfaces": [], "resourceRequirements": [ { "value": "2", "type": "VCPU" }, { "value": "256", "type": "MEMORY" } ], "secrets": [] }, "tags": { "resourceArn": "arn:aws-cn:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8" }, "propagateTags": false, "platformCapabilities": [] } }