Reputation: 31
Although my EC2 instance (with AIM optimized-for-ECS) has the ecs agent running but the container does not start in my EC2. To confirm that ecs-agent is running at my EC2 instance, I have checked:
Below are captured images for proving ECS-agents are OK with my EC2 instance.
Pic1: ecs-agent start successfully on my EC2 instance
Pic2: My EC2 instance registered successfully with cluster
Pic3: Service status is ACTIVE
Pic4: Task-definition status is ACTIVE
Anybody have any idea why ECS does not invoke container (nginx:latest with port mapping 80) at my EC2 instance ? (no activities observed at logs as well).
I have been scratching my head many days but the issue is still there :(
Upvotes: 3
Views: 3647
Reputation: 5637
Now that there's enough information in your pictures, it has become clear that what's happening is that you've launched your task with a Fargate launch type -- your task is running, but not on your EC2 instances.
Fargate's purpose is to allow you to run containers without needing to be aware of the servers/instances at all -- you're simply running those containers on infrastructure you don't have to manage.
That means that although you have an ECS cluster with EC2 instances in it, those instances aren't being used for a Fargate task, because that's kinda the whole point of Fargate.
Upvotes: 1