MonitorX is a production-style AWS cloud monitoring project that monitors the health of an Amazon EC2 instance by collecting CPU, memory, and disk metrics. It automatically generates alerts when resource utilization exceeds predefined thresholds, stores alert events in Amazon S3, and records AWS account activity using CloudTrail for auditing.
This project demonstrates how multiple AWS services work together to build an automated monitoring and alerting solution similar to those used in real production environments.
- Monitor EC2 CPU, Memory, and Disk utilization
- Collect custom metrics using CloudWatch Agent
- Create CloudWatch Alarms for high resource usage
- Trigger AWS Lambda automatically from alarms
- Store alert events in Amazon S3
- Configure SNS email notifications
- Track AWS account activities using CloudTrail
- Audit logs stored securely in Amazon S3
+----------------+
| Amazon EC2 |
+----------------+
|
|
CloudWatch Agent
|
▼
Amazon CloudWatch
(Metrics)
|
▼
CloudWatch Alarms
|
▼
AWS Lambda
|
+-----------+-----------+
| |
▼ ▼
Amazon SNS Amazon S3
(Email Notification) (Alert Storage)
----------------------------------------------------
AWS Account Activity
|
▼
AWS CloudTrail
|
▼
Amazon S3
(Audit Log Storage)
- Amazon EC2
- Amazon CloudWatch
- Amazon CloudWatch Agent
- AWS Lambda
- Amazon SNS
- Amazon S3
- AWS CloudTrail
- AWS IAM
- Launch an Ubuntu EC2 instance.
- Install and configure the CloudWatch Agent.
- Collect CPU, memory, and disk metrics.
- Send metrics to CloudWatch.
- Create CloudWatch Alarms.
- Invoke a Lambda function when alarms are triggered.
- Store alert details in Amazon S3.
- Send email notifications using Amazon SNS.
- Record AWS account activity using CloudTrail.
- Store audit logs in Amazon S3.
- CPU Utilization
- Memory Usage
- Disk Usage
| Metric | Threshold |
|---|---|
| CPU Utilization | > 80% |
| Memory Usage | > 80% |
| Disk Usage | > 85% |
MonitorX/
│
├── README.md
├── instruction.md
├── lambda/
│ └── lambda_function.py
├── cloudwatch/
│ └── amazon-cloudwatch-agent.json
├── screenshots/
└── architecture.png
- AWS EC2
- CloudWatch
- CloudWatch Agent
- AWS Lambda
- Amazon SNS
- Amazon S3
- AWS CloudTrail
- IAM
- Ubuntu 24.04 LTS
- Python (Boto3)
sudo apt install stress -y
stress --cpu 2 --timeout 300sudo apt install stress-ng -y
stress-ng --vm 1 --vm-bytes 80% --timeout 300sfallocate -l 5G testfileor
dd if=/dev/zero of=testfile bs=1M count=5000Include screenshots of:
- EC2 Instance
- IAM Roles
- CloudWatch Metrics
- CloudWatch Dashboard
- CloudWatch Alarms
- SNS Topic
- Email Notification
- Lambda Function
- S3 Alert Bucket
- CloudTrail Event History
- CloudTrail S3 Logs
By completing this project, I gained hands-on experience with:
- AWS IAM Roles and Permissions
- Amazon EC2 Management
- CloudWatch Metrics and Dashboards
- CloudWatch Agent Configuration
- CloudWatch Alarms
- Event-driven automation using AWS Lambda
- Amazon SNS Notifications
- Amazon S3 Object Storage
- AWS CloudTrail Audit Logging
- Production-style cloud monitoring architecture
- CloudWatch Dashboard with custom widgets
- Slack or Microsoft Teams notifications
- Auto-remediation using AWS Systems Manager
- Terraform Infrastructure as Code
- AWS CDK deployment
- Multi-instance monitoring
- Auto Scaling integration
Ashutosh Shukla
AWS | Cloud Computing | DevOps Enthusiast
MonitorX is a production-style AWS monitoring platform that combines Amazon EC2, CloudWatch, CloudWatch Agent, Lambda, SNS, S3, IAM, and CloudTrail to monitor infrastructure health, automate alerts, store alert data, and maintain audit logs. This project demonstrates practical cloud monitoring, automation, and security concepts commonly used in modern AWS environments.