AWS Services provides the various types of logs. In general, you can use CloudWatch Logs & CloudWatch Logs Insights to gather and analyze logs.
Application Logs
- Application logs are created by applications running in AWS environment or on-premise infrastructures.
- In general, application logs are written in the files in EC2 or on-premise instances.
| Applications | Agents | Destination |
|---|
| Custom applications on EC2 or on-premise instances | CloudWatch unified agent | CloudWatch Logs |
| Lambda | No | Direct integration with CloudWatch Logs |
| ECS or Fargate | No | Direct integration with CloudWatch Logs |
| Elastic Beanstalk | No | Direct integration with CloudWatch Logs |
Operating System (OS) Logs
- Event logs or System logs generated by OS in your EC2 or on-premise instances
- ex) /var/log/messages or /var/log/auth.log
- Usually, you can stream logs to CloudWatch Logs using the CloudWatch unified agent.
AWS-Managed Logs
| Services | Destination |
|---|
| Load Balancer (ALB, NLB) Access Logs | S3 |
| CloudTrail Logs | S3, CloudWatch Logs |
| VPC Flow Logs | S3, CloudWatch Logs |
| Route 53 Logs | CloudWatch Logs |
| S3 Access Logs | S3 |
| CloudFront Access Logs | S3 |
Published by Pyongwon Lee
IT (Cloud, Web) Development, Philosophy, Economics.
View all posts by Pyongwon Lee