You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the AWS Solutions Constructs to deploy a mock Flask application onto AWS Fargate with an Application Load Balancer, but I'm encountering an issue where the service never completes deploying. Looking into the service and related asset security groups, everything looks correct as far as the ports and permissions. From the service perspective, it looks as though it's going from deploying to draining, leading to continuous restarts. I've outlined the relevant parts of the example code below and would greatly appreciate any insights or suggestions you might have.
This is the very simple code I'm deploying as a test.
I've ensured the Flask application listens on port 5000 and the Docker container also exposes this port. My health check endpoint at /health returns a 200 status with a JSON response.
More importantly this is the AWS CDK Solutions Construct code:
I played around with the commented-out options in case the issue with the deployment was either an impossibility to reach some important resource from the private subnet where the service is deployed or some limitation with memory. However, I believe things should work without those configurations.
I also changed the target group's health check so it's configured to the "/health" endpoint of the Flask app (I also tried the default "/" route without any specification). Despite this, the ECS service is still continuously restarted and has never moved from deploying to completion.
I believe that as is, this construct should be deployed out of the box. Could there be any configuration I'm overlooking that's causing this issue? Any advice or debugging tips would be immensely helpful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm using the AWS Solutions Constructs to deploy a mock Flask application onto AWS Fargate with an Application Load Balancer, but I'm encountering an issue where the service never completes deploying. Looking into the service and related asset security groups, everything looks correct as far as the ports and permissions. From the service perspective, it looks as though it's going from deploying to draining, leading to continuous restarts. I've outlined the relevant parts of the example code below and would greatly appreciate any insights or suggestions you might have.
This is the very simple code I'm deploying as a test.
Flask Application (app.py):
This is the Dockerfile I'm using:
I've ensured the Flask application listens on port 5000 and the Docker container also exposes this port. My health check endpoint at /health returns a 200 status with a JSON response.
More importantly this is the AWS CDK Solutions Construct code:
I played around with the commented-out options in case the issue with the deployment was either an impossibility to reach some important resource from the private subnet where the service is deployed or some limitation with memory. However, I believe things should work without those configurations.
I also changed the target group's health check so it's configured to the "/health" endpoint of the Flask app (I also tried the default "/" route without any specification). Despite this, the ECS service is still continuously restarted and has never moved from deploying to completion.
I believe that as is, this construct should be deployed out of the box. Could there be any configuration I'm overlooking that's causing this issue? Any advice or debugging tips would be immensely helpful.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions