3 Answers
- Newest
- Most votes
- Most comments
1
The problem was the underlying EC2 instance. It stopped operating normally for some reason. After terminating it and starting a new instance for the batch cluster the jobs started running again and the log stream were being created and populated with events.
0
It was an expired token issue:
Handler for POST /v1.24/containers/.../start returned
error: failed to create task for container:
failed to initialize logging driver:
failed to create Cloudwatch log stream: operation error
CloudWatch Logs: CreateLogStream,
https response error StatusCode: 400, RequestID: 0a7cde21-c566-4950-b8a7-aac7e4971133,
api error ExpiredTokenException: The security token included in the request is expired
answered 2 years ago
0
It sounds like the issue is related to throttling errors when creating CloudWatch log streams from AWS Batch jobs. Can you check on these ?
- Verify that the IAM role used by the AWS Batch job has permissions to create log streams in CloudWatch Logs.
- Check if you are hitting the CloudWatch Logs throttling limits. Each AWS account has a limit on the number of log events it can ingest per second across all log groups. Batch jobs creating logs concurrently could exceed this limit.
- Try increasing the logging retries configuration in the AWS Batch job definition. This will make the job retry creating log streams on throttling errors before failing.
"containerProperties": {
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/aws/batch/job",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "job",
"awslogs-create-group": "true",
"awslogs-retries": "5"
}
}
}
Relevant content
asked 7 years ago
asked 2 years ago
- AWS OFFICIALUpdated a year ago

Is not a permission error because very few jobs do manage to start successfully.
How can I see if I'm hitting the CloudWatch Logs throttling limits? Also, afaik throttling errors have a specific error message and not
operation error—something likeThrottlingException: Rate exceeded status code: 400.It looks like you can't set retries for awslogs log driver:
Log driver awslogs disallows options: awslogs-retries