Reputation: 1605
I'm trying to learn how to deploy a gunicorn/flask app using ecs-cli. I see the task running from the aws console after running ecs-cli compose service up, but am unable to access the app from the provided public IP followed by :5000. I tried to change the ports from 5000 to 80 in the docker-compose-yml but that doesn't work either. It runs locally (when I comment out the logging directives for aws). What am I missing?
version: '3'
services:
web:
image: 81234567878.dkr.ecr.us-east-2.amazonaws.com/myapp-gunicorn:v1
build: ./services/web
command: gunicorn --bind 0.0.0.0:5000 project:app
ports:
- 5000:5000
env_file:
- ./.env.prod
logging:
driver: awslogs
options:
awslogs-group: my-site
awslogs-region: us-east-2
awslogs-stream-prefix: myweb
Upvotes: 2
Views: 1534
Reputation: 8593
In your Fargate task's security group, you should allow the port 5000. if your task is part of a service, then you should do allow the port in the service's security group.
Upvotes: 2