Hi AWS, I am creating an ECS Service and while doing that I am getting the error: Resource handler returned message: "Error occurred during operation 'ECS Deployment Circuit Breaker was triggered'." (RequestToken: 8d5f80cb-c2d8-e7fc-ff9e-1d221362973b, HandlerErrorCode: GeneralServiceException) as attached in the screenshot below.
Here is the JSON code for task definition file:
{
"taskDefinitionArn": "arn:aws:ecs:us-east-1:123456789012:task-definition/aws-ecs-docker:1",
"containerDefinitions": [
{
"name": "exp-code-pipeline",
"image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/ecs-docker-demo:latest",
"cpu": 0,
"portMappings": [
{
"name": "exp-code-pipeline-80-tcp",
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [],
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/aws-ecs-docker",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"family": "aws-ecs-docker",
"executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"revision": 1,
"volumes": [],
"status": "ACTIVE",
"requiresAttributes": [
{
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"name": "ecs.capability.execution-role-awslogs"
},
{
"name": "com.amazonaws.ecs.capability.ecr-auth"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
},
{
"name": "ecs.capability.execution-role-ecr-pull"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"name": "ecs.capability.task-eni"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
}
],
"placementConstraints": [],
"compatibilities": [
"EC2"
],
"requiresCompatibilities": [
"EC2"
],
"cpu": "1024",
"memory": "1024",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"registeredAt": "2024-06-11T08:13:42.129Z",
"registeredBy": "arn:aws:iam::123456789012:user/devsecops-iam-user",
"tags": []
}
I have checked the error logs in CloudWatch Log Group as well but didn't find any and I am attaching the screenshot below for the same.
I have checked the Dockerfile and tried to create a docker image locally and it worked fine but just pasting the code to review it once if there is any error:
FROM --platform=linux/amd64 node:18-alpine
WORKDIR /app
COPY . .
RUN yarn install
CMD ["node", "index.js"]
EXPOSE 3000
I have also followed the repost link https://repost.aws/questions/QU5nk1tyN_TpWbKm85LdWGgA/resource-handler-returned-message-ecs-deployment-circuit-breaker-was-triggered-handlererrorcode-generalserviceexception, but no luck.
Please advise.