Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View log files from EC2 instances

I am deploying a python application using nginx/uwsgi on aws.

What is the best/recommended way to view the log files produced from those two modules (in /var/log/uwsgi and /var/log/nginx) as also some custom application log files e.g. in /my/app/logfiles/error.log etc?

like image 305
pkaramol Avatar asked Sep 12 '25 21:09

pkaramol


1 Answers

The best and easiest way to keep track of your logs is using Amazon CloudWatch Logs.

For an overview, read the blog post. To setup/install the CloudWatch Logs agent, read Getting Started.

Your EC2 instance will also need an IAM role allowing it to write logs.

like image 57
Bhavesh Avatar answered Sep 14 '25 13:09

Bhavesh