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.

已提問 5 個月前檢視次數 292 次
1 個回答
-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
專家
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南