Amazon ECS stores logs in the /var/log/ecs folder of your container instances. There are logs available from the Amazon ECS container agent and from the ecs-init service that controls the state of the agent (start/stop) on the container instance.
How do I get ECS fargate logs?
Collecting logs from ECS on Fargate using the awslogs driver
You can configure your ECS task to use the awslogs log driver to send logs to CloudWatch Logs. To do this, either update your task definition to specify the awslogs driver or use the ECS console.
How do I check my ECS logs in CloudWatch?
Centralized Container Logs with Amazon ECS and Amazon CloudWatch Logs
- Step 1: Create a CloudWatch Log group. Navigate to the CloudWatch console and choose Logs. ...
- Step 2: Create an ECS task definition. ...
- Step 3: Run the task. ...
- Step 4: Generate logs. ...
- Step 5: View the log.