Resource handler returned message: "Error occurred during operation 'ECS Deployment Circuit Breaker was triggered'." (RequestToken: 471a6121-24b2-4322-5977-fe980723abce, HandlerErrorCode: GeneralServi

0

I am deploying my application on ECS. But i am getting this error while creating a service. It is working fine on my local container but not deploying on ECS

FROM python:latest

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the current directory contents into the container at /usr/src/app
COPY . .

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install gunicorn

EXPOSE 8000

# Define environment variable
# ENV AWS_BUCKET_NAME=xyz

# Run app.py when the container launches
CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]

Error Message CloudFormation Logs

  • i am facing the same issue. i was already using the ECS with EC2. but after new UI changes, i am unable to run the task on new cluster. if its fargate, its working fine.

1 Answer
-1

Hi,

As already mentioned before, the reason for this error is that healthcheck is not passed.

Typically the circuit breaker is triggered when the app does not bootstrap correctly and is deemed as unhealthy.

Start looking into this: https://repost.aws/knowledge-center/ecs-task-container-health-check-failures

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions