An open API service indexing awesome lists of open source software.

https://github.com/tejeshkumarreddyc/log-processing-of-webserver-logs-aws

Logs of a web server such as apache are logged in cloudwatch and processed using subscription filter & ultimately error logs are stored in s3 via lambda for further analysis
https://github.com/tejeshkumarreddyc/log-processing-of-webserver-logs-aws

aws cloudwatch-logs ec2-instance event-driven httpd-server iam lambda-functions logprocess rest-api s3-storage sdk-python shell-script sns

Last synced: 3 months ago
JSON representation

Logs of a web server such as apache are logged in cloudwatch and processed using subscription filter & ultimately error logs are stored in s3 via lambda for further analysis

Awesome Lists containing this project

README

          

**Workflow:-**
Webserver_logs(EC2) ---> Log_group(Cloudwatch) ---> Lambda ---> S3_Bucket & Notification (SNS)

-->**Introduction**
In this project we're gonna perform log processing of a web server using cloudwatch logs, lambda, s3 and subscription filters.

-->**Installation of a simple http server in EC2**
sudo yum update -y
sudo yum install httpd -y
systemctl start httpd
systemctl enable httpd

-->**AWS CLI installation**
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws configure

-->**Cloudwatch agent installation in EC2**
yum install amazon-cloudwatch-agent -y
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
systemctl enable amazon-cloudwatch-agent
systemctl start amazon-cloudwatch-agent

-->**Create an S3 BUCKET**

-->**Create a subscription filter using the below pattern**
filter pattern
403 ( Filters the 403 errors of logs of the web server from the cloudwatch ).
destination
Lambda function ( It'll be invoked by the cloudwatch and those error messages of web server are stored in S3 for further analysis).

-->**Create a rest API and link it to the Lambda**
User can access those logs from S3 via API gateway using the API endpoint.