How to check logs inside ECS Fargate container?

I'm running a springboot application in a ECS fargate cluster. Is there any way I can log into Fargate docker container to see the logs?

Upvotes: 6

Views: 12930

Answers (1)

mreferre
mreferre

Reputation: 6073

The best way to check your container logs is by flagging the checkbox to send them to CloudWatch (this can be done at the container level configuration in the task definition): enter image description here

Alternatively, if your log is in a specific file and not printed to stdout you can use ECS exec to get a shell inside the container and do your analysis from within.

Upvotes: 4

Related Questions