Skip to content

About

Hands-on AWS Linux System Administration and Monitoring project using Ubuntu EC2, Nginx, CloudWatch, S3, IAM, Bash scripting, Cron, and Linux troubleshooting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AWS Linux System Administration & Monitoring

Hands-on AWS + Linux project demonstrating server administration, security, monitoring, troubleshooting, automation, and operational practices using Ubuntu EC2.


πŸ“Œ Project Overview

This project demonstrates practical Linux System Administration on an Ubuntu Linux server hosted on Amazon EC2.

The environment was configured and managed to simulate real-world day-to-day responsibilities of a:

  • Linux System Administrator
  • AWS Cloud Support Engineer
  • Junior DevOps Engineer

Key Areas Covered

  • Linux user and group administration
  • File ownership and permissions
  • SSH-based remote administration
  • Nginx web server management
  • UFW firewall configuration
  • Process and systemd service management
  • CPU, memory, disk, and network monitoring
  • Linux and application log analysis
  • Shell scripting
  • Cron-based automation
  • AWS CloudWatch monitoring
  • CloudWatch Agent
  • CloudWatch Metrics
  • CloudWatch Alarms
  • IAM role-based AWS access
  • Amazon S3 report and log storage
  • AWS CLI
  • Git and GitHub

πŸ—οΈ Solution Architecture

                         ☁️ AWS
                           β”‚
                           β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚   Amazon EC2     β”‚
                  β”‚   Ubuntu Linux   β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                β”‚                β”‚
          β–Ό                β–Ό                β–Ό
     πŸ” SSH Access    🌐 Nginx        🐧 Linux Admin
          β”‚                β”‚                β”‚
          β–Ό                β–Ό                β”œβ”€β”€ Users & Groups
     πŸ”₯ UFW Firewall   Nginx Logs          β”œβ”€β”€ Permissions
                                            β”œβ”€β”€ Processes
                                            β”œβ”€β”€ Services
                                            β”œβ”€β”€ Disk
                                            β”œβ”€β”€ Networking
                                            └── Troubleshooting
                           β”‚
                           β–Ό
                  🐚 server_health.sh
                           β”‚
                           β–Ό
                    ⏰ Cron - Every 5 Min
                           β”‚
                           β–Ό
                      health.log
                           β”‚
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β”‚                           β”‚
             β–Ό                           β–Ό
      πŸ“Š CloudWatch                 ☁️ Amazon S3
             β”‚                           β”‚
      CloudWatch Agent             health-reports/
             β”‚                           β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”                    └── logs/
      β–Ό      β–Ό      β–Ό
     CPU    RAM    Disk
      β”‚      β”‚      β”‚
      β””β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”˜
             β–Ό
      CloudWatch Metrics
             β”‚
             β–Ό
      CloudWatch Alarms

☁️ AWS Services

AWS Service Purpose
Amazon EC2 Host the Ubuntu Linux server
AWS IAM Provide role-based permissions to EC2
Amazon CloudWatch Monitor server performance
CloudWatch Agent Collect CPU, memory, and disk metrics
CloudWatch Metrics Store and visualize monitoring data
CloudWatch Alarms Trigger alerts based on configured thresholds
Amazon S3 Store health reports and logs
AWS CLI Manage AWS resources from the Linux server

🐧 Linux / Ubuntu Administration

Operating System

  • Ubuntu Linux

User Management

The project covers basic Linux user administration, including:

  • User creation
  • User verification
  • User and group administration

Common commands:

adduser
id
groups

Group Management

groupadd
usermod
groups

Sudo / Privilege Management

Administrative privileges can be configured using the appropriate Linux groups.

Example:

sudo usermod -aG sudo username

File & Directory Management

Common commands used:

mkdir
ls
ls -la
cp
cat
nano

File Ownership

chown

Example:

sudo chown username:group filename

File Permissions

chmod

Example:

chmod 640 filename

πŸ” SSH Remote Administration

SSH was used to remotely access and administer the Ubuntu EC2 server.

Key Concepts

  • SSH login
  • .pem key authentication
  • SSH connectivity
  • Port 22
  • Secure remote administration

Example:

ssh -i linux-admin-key.pem ubuntu@PUBLIC-IP

Note: Replace linux-admin-key.pem and PUBLIC-IP with your actual key file and EC2 public IP address.


βš™οΈ Process Management

Linux processes were monitored and investigated using:

ps
ps aux
ps -ef
top

These commands help identify:

  • Running processes
  • CPU-consuming processes
  • Memory-consuming processes
  • Process IDs
  • Process states

πŸ”„ Service Management / systemd

The Nginx service was managed using systemctl.

sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl status nginx
sudo systemctl enable nginx
sudo systemctl is-enabled nginx

Service failure scenarios were also considered for troubleshooting practice.


🌐 Nginx Web Server

Nginx was installed and configured as a web server on the Ubuntu EC2 instance.

Activities

  • Nginx installation
  • Nginx service management
  • Custom web page configuration
  • Configuration validation
  • Log analysis

Test Nginx configuration:

sudo nginx -t

Nginx Logs

/var/log/nginx/access.log
/var/log/nginx/error.log

Useful commands:

tail
journalctl

πŸ”₯ UFW Firewall

UFW was configured as the Linux host-based firewall.

sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
sudo ufw status

Ports

Port Purpose
22 SSH
80 HTTP
443 HTTPS

AWS Security Groups should also be configured appropriately because UFW and AWS Security Groups operate at different network layers.


🌐 Network Troubleshooting

Network configuration and connectivity were checked using:

ip addr
ip route
ping
ss

Examples:

ping -c 4 8.8.8.8
ping -c 4 google.com
ss -tulpn

These commands help troubleshoot:

  • IP configuration
  • Routing
  • Internet connectivity
  • Listening ports
  • Active network connections

πŸ’Ύ Disk & Storage Management

Disk and storage utilization were monitored using:

df -h
du -sh
lsblk

Root filesystem check:

df -h /

These commands help identify:

  • Disk utilization
  • Large directories
  • Mounted filesystems
  • Available storage
  • Block devices

🧠 CPU & Memory Monitoring

System resource usage was checked using:

free -h
uptime
top

The monitoring focuses on:

  • CPU utilization
  • Memory utilization
  • System uptime
  • Running processes
  • System load

πŸ“‹ Log Analysis

The project includes practical log analysis of:

  • Nginx access logs
  • Nginx error logs
  • System logs
  • Cron output
  • Server health logs

Useful commands:

tail
cat
journalctl

Example:

sudo tail -f /var/log/nginx/error.log

🐚 Shell Scripting

The main server health-check script is:

server_health.sh

The script checks important server health information such as:

  • Hostname
  • Uptime
  • Memory usage
  • Disk usage
  • Nginx service status

Make the script executable:

chmod +x server_health.sh

Run manually:

./server_health.sh

⏰ Cron Automation

The health-check script is scheduled to run every 5 minutes using Cron.

Example:

*/5 * * * * /home/ubuntu/Linux-Project/server_health.sh >> /home/ubuntu/Linux-Project/health.log 2>&1

Purpose

The automated job:

  1. Executes every 5 minutes
  2. Checks server health
  3. Appends output to health.log
  4. Captures errors using 2>&1

Check configured Cron jobs:

crontab -l

πŸ“Š AWS CloudWatch Monitoring

The Amazon CloudWatch Agent is configured on the Ubuntu EC2 instance to collect additional system-level metrics.

Metrics Collected

  • CPU
  • Memory
  • Disk

CloudWatch Namespace

Linux/EC2

Collection Interval

60 seconds

CPU Metrics

cpu_usage_idle
cpu_usage_user
cpu_usage_system

Memory Metric

mem_used_percent

Disk Metric

disk_used_percent

CloudWatch provides centralized visibility into the server's resource utilization.


🚨 CloudWatch Alarms

The project includes monitoring plans/configuration for:

Linux-Server-High-CPU
Linux-Server-High-Memory
Linux-Server-High-Disk

Example threshold:

80%

These alarms are intended to identify high resource utilization and support proactive server monitoring.


πŸ”‘ IAM Role

An IAM role was created for the EC2 instance:

EC2-CloudWatch-Agent-Role

The role provides AWS permissions required by the EC2 server for CloudWatch monitoring and S3 operations.

Primary CloudWatch policy:

CloudWatchAgentServerPolicy

The EC2 instance uses an IAM role instead of storing long-term AWS access keys on the server.

This follows a more secure approach for accessing AWS services from EC2.


☁️ Amazon S3

Amazon S3 is used to store generated health reports and log files.

Bucket

prajwal-linux-admin-monitoring-2026

Structure

prajwal-linux-admin-monitoring-2026/
β”‚
β”œβ”€β”€ health-reports/
β”‚   └── server-health.txt
β”‚
└── logs/
    └── health.log

Upload Health Report

aws s3 cp server-health.txt \
s3://prajwal-linux-admin-monitoring-2026/health-reports/

Upload Log

aws s3 cp health.log \
s3://prajwal-linux-admin-monitoring-2026/logs/

Verify Objects

aws s3 ls s3://prajwal-linux-admin-monitoring-2026/ --recursive

πŸ–₯️ AWS CLI

AWS CLI was used from the Ubuntu EC2 server to interact with AWS services.

Commands used include:

aws --version
aws s3 ls
aws s3 cp
aws s3api head-object

AWS CLI allows AWS resources and services to be managed directly from the Linux command line.


πŸ“ Project Structure

AWS-Linux-system-admin-monitoring/
β”‚
β”œβ”€β”€ configs/
β”‚   └── CloudWatch configuration files
β”‚
β”œβ”€β”€ docs/
β”‚   └── Project documentation
β”‚
β”œβ”€β”€ screenshots/
β”‚   └── AWS and Linux screenshots
β”‚
β”œβ”€β”€ server_health.sh
β”œβ”€β”€ .gitignore
└── README.md

πŸ”§ Commands & Tools Used

Linux

whoami
hostname
pwd
ls
ls -la
cat
cp
nano
apt
adduser
groupadd
usermod
id
groups
chown
chmod
ps
top
systemctl
journalctl
nginx
ip
ping
ss
df
du
lsblk
free
uptime
crontab

AWS

aws --version
aws s3 ls
aws s3 cp
aws s3api head-object

Git

git init
git add .
git commit
git branch
git remote
git push

πŸ§ͺ Troubleshooting Areas Covered

The project provides hands-on practice with common Linux server issues.

High CPU

top
ps aux
uptime

High Memory

free -h
top

Disk Full

df -h
du -sh
lsblk

Nginx Issue

systemctl status nginx
nginx -t
journalctl
tail /var/log/nginx/error.log

Network Issue

ip addr
ip route
ping
ss -tulpn

Log Investigation

tail
cat
journalctl

πŸ“ˆ Monitoring Flow

Ubuntu EC2
    β”‚
    β–Ό
CloudWatch Agent
    β”‚
    β”œβ”€β”€ CPU
    β”œβ”€β”€ Memory
    └── Disk
    β”‚
    β–Ό
CloudWatch Metrics
    β”‚
    β–Ό
CloudWatch Alarms
    β”‚
    β–Ό
Resource Utilization Monitoring

πŸ“¦ Report & Log Flow

Ubuntu EC2
    β”‚
    β–Ό
server_health.sh
    β”‚
    β–Ό
Cron - Every 5 Minutes
    β”‚
    β–Ό
health.log / server-health.txt
    β”‚
    β–Ό
AWS CLI
    β”‚
    β–Ό
Amazon S3
    β”‚
    β”œβ”€β”€ health-reports/
    └── logs/

πŸ” Security Practices

The project demonstrates basic server and cloud security practices:

  • SSH key-based authentication
  • UFW firewall configuration
  • AWS Security Group awareness
  • IAM role-based AWS access
  • Least-privilege oriented AWS access
  • Linux file ownership and permissions
  • No hard-coded AWS credentials in scripts
  • Controlled network ports
  • Secure remote administration

πŸ› οΈ Technologies Used

Category Technologies
Cloud AWS
Compute Amazon EC2
Operating System Ubuntu Linux
Monitoring Amazon CloudWatch
Monitoring Agent CloudWatch Agent
Storage Amazon S3
Access Management AWS IAM
CLI AWS CLI
Web Server Nginx
Firewall UFW
Automation Cron
Scripting Bash / Shell
Version Control Git
Repository GitHub

🎯 Skills Demonstrated

This project demonstrates practical skills in:

  • Linux System Administration
  • AWS EC2 Administration
  • AWS IAM
  • CloudWatch Monitoring
  • Server Health Monitoring
  • CPU / Memory / Disk Troubleshooting
  • Nginx Administration
  • SSH Administration
  • Linux Firewall Management
  • User & Group Management
  • File Permissions
  • Process Management
  • systemd Service Management
  • Network Troubleshooting
  • Log Analysis
  • Shell Scripting
  • Cron Automation
  • AWS CLI
  • S3 Operations
  • Git & GitHub

πŸ“Έ Project Evidence

Screenshots and supporting documentation are maintained in:

screenshots/
docs/
configs/

Recommended Evidence

  • EC2 instance
  • IAM role
  • CloudWatch Agent
  • CloudWatch metrics
  • CloudWatch alarms
  • S3 bucket
  • Linux users and groups
  • File permissions
  • Nginx configuration and status
  • UFW configuration
  • Cron configuration
  • Server health script
  • AWS CLI commands

πŸ‘¨β€πŸ’» Project Author

Prajwal Take

GitHub:

https://github.com/tprajwal14

⭐ Project Summary

An end-to-end hands-on AWS and Linux System Administration project covering EC2 server administration, security, Nginx, SSH, UFW, systemd, process management, disk and network troubleshooting, shell scripting, Cron automation, CloudWatch monitoring, IAM, S3, AWS CLI, Git, and GitHub.


πŸ“Œ Project Highlights

  • ☁️ Deployed and administered an Ubuntu Linux server on AWS EC2
  • 🐧 Performed practical Linux administration and troubleshooting
  • πŸ” Implemented SSH access, Linux permissions, UFW, and IAM-based access
  • 🌐 Installed and managed Nginx web server
  • πŸ“Š Configured CloudWatch monitoring for system resources
  • 🚨 Created monitoring and alerting concepts using CloudWatch Alarms
  • 🐚 Automated server health checks using Bash and Cron
  • ☁️ Stored reports and logs in Amazon S3 using AWS CLI
  • πŸ“ Maintained project documentation, configuration files, and evidence using Git/GitHub

About

Hands-on AWS Linux System Administration and Monitoring project using Ubuntu EC2, Nginx, CloudWatch, S3, IAM, Bash scripting, Cron, and Linux troubleshooting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages