DevSecOps & SecurityProduction• AWS EC2 (Ubuntu LTS ap-south-1)

OnixMall Production-Hardened Cloud & Observability Stack

Hardened AWS EC2 infrastructure with Prometheus metrics collection, Grafana observability dashboards, Trivy vulnerability scanning, and strict UFW firewall policies.

Stack:
AWS EC2AWS EC2
PrometheusPrometheus
GrafanaGrafana
PrometheusNode Exporter
TrivyTrivy Vulnerability Scanner
LinuxUFW Firewall
Section 01

Executive Overview & Context

Designed and deployed a production-hardened Linux cloud infrastructure for an e-commerce platform. Features continuous automated Trivy CVE vulnerability scans, Prometheus metric scraping of host resources, Grafana operational telemetry dashboards, and strict network isolation.

Deployment Target
AWS EC2 (Ubuntu LTS ap-south-1)
Production Status
Production Verified
Primary Objective
Automated & Hardened

Project Objectives

1. Build real-time host and process metrics telemetry with Prometheus. 2. Design Grafana dashboards for CPU, memory, network, and disk I/O monitoring. 3. Implement automated vulnerability scanning using Trivy. 4. Enforce CIS-inspired Linux OS hardening standards and UFW firewall rules.

The Problem

Challenges & Pain Points

Overcame lack of server health visibility, unmonitored disk/memory usage surges, unpatched OS package vulnerabilities, and unprotected network attack surfaces on public cloud instances.

The Solution

Engineered Implementation

Configured Prometheus server scraping Node Exporter on localhost:9100. Built custom Grafana dashboards for alert notifications on high CPU or memory thresholds. Automated Trivy scans running scheduled daily audits with Markdown vulnerability reports.

Capabilities

Key Engineering Features

Continuous automated Trivy vulnerability scanning for OS packages and container layers
Prometheus time-series collection of CPU, RAM, disk I/O, and network metrics
Grafana dashboards visualising real-time host resource utilisation and alert triggers
UFW firewall policy enforcing default-deny ingress with rate-limited SSH
Automated SSL certificate renewal daemon managed via systemd timers
Architecture

System Topology & Traffic Flow

Ingress → AWS EC2 Security Group → Linux UFW Firewall → Nginx Web Server. Prometheus server periodically scrapes Node Exporter on localhost:9100, providing telemetry to Grafana.

Inspect Detailed Cloud & Security Architecture

Explore full multi-layer topology, live active ports, security controls, and verified repository evidence in the Architecture Explorer.

Engineering Notes

Implementation Details & Workflow

Created standardized Bash provisioning scripts to configure non-root system users, disable SSH password authentication, configure sysctl kernel parameters (such as disabling IP forwarding and enabling SYN cookies), and automate security updates via unattended-upgrades.

CI/CD & Automation Pipeline

Automated cron jobs execute Trivy security audits daily, generating formatted Markdown status reports to verify zero unaddressed High or Critical CVEs in installed packages.

Security & Hardening Controls

Fail2ban daemon actively monitors SSH authentication failures and injects temporary iptables drop rules against repeat offenders. Ingress ports for Grafana and Prometheus are restricted to localhost and accessible only via SSH tunnels or authenticated reverse proxies.

Tech Stack

Technologies & Cloud Services

AWS EC2
AWS EC2AWS EC2
Prometheus
PrometheusPrometheus
Grafana
GrafanaGrafana
Prometheus
Node ExporterPrometheus
Trivy
Trivy Vulnerability ScannerTrivy
Linux
UFW FirewallLinux
Let's Encrypt
Certbot SSLLet's Encrypt
Bash / ShellVerified Component
Linux
Linux HardeningLinux
Impact & Outcomes

Measurable Results

100% visibility into server resource consumption and instant alerting before memory exhaustion occurs. System security posture verified against common vulnerability benchmarks.

Lessons & Challenges Solved

Balancing Prometheus memory consumption on standard EC2 instances was resolved by fine-tuning storage retention policies (--storage.tsdb.retention.time=15d) and scrape intervals.