Security Monitoring & Logging in the Cloud: Tools & Best Practices

Cloud security monitoring center showing real-time alerts, audit logs, threat investigation, and compliance reporting dashboard

Introduction

In the cloud, there is one rule that never changes: “If it is not logged, it did not happen — and if you cannot monitor it, you cannot protect it.” Many businesses assume that once they move to AWS, Azure, or Google Cloud, logging and monitoring work automatically. This is one of the most costly mistakes in cloud security.

In 2025, the Indonesian Cyber Security Institute (ICSI) reported that 42% of cloud breach victims could not identify how attackers entered their systems because audit logs were disabled, incomplete, or deleted. Another 37% of organizations missed early warning signs of attacks because they only checked logs once a month or had no alerts configured at all.

Furthermore, regulations like Indonesia’s PDP Law No.27/2022, GDPR, and PCI DSS mandate that you keep complete, unaltered records of all activity — and being unable to produce these records results in fines starting from IDR 100 million, even if no breach occurred.

This fully expanded guide explains the difference between logging and monitoring, exactly what you must record, how to build an unbreakable log system, compare the best tools, set up effective alerts, and meet every compliance requirement — with clear tables and step-by-step examples you can implement today.


Core Concepts: Logging vs Monitoring

Many teams use these terms interchangeably, but they have distinct roles that work together:

Table

AspectLoggingMonitoring
PurposeRecord facts about what happenedDetect anomalies and warn of risks
What it doesStores permanent evidence for audits and investigationsChecks real-time activity against expected patterns
Key Question“Who did what, when, and from where?”“Is this activity normal or dangerous?”
TimelineHistorical — kept for months or yearsReal-time — reacts within seconds or minutes
OutputStructured data files with timestampsAlerts, dashboards, and automated actions
ComplianceMandatory — required by lawHighly recommended — often required for certification

Why You Need Both: Logging without monitoring means you have evidence but no warning. Monitoring without logging means you get alerts but cannot prove what happened or investigate properly.


What You Must Log: Complete List & Requirements

Not all logs are equal — these are the categories you must enable for full protection and compliance:

Table

Log TypeWhat It RecordsMandatory ForMinimum Retention
Cloud Audit / Admin LogsEvery action in your cloud console: create/delete resources, change permissions, modify security settingsAll regulations — PDP, GDPR, HIPAA, PCI12 months
Authentication LogsLogin success/failure, MFA attempts, password changes, new device accessThreat detection, breach investigation12 months
Network Traffic LogsAllowed/blocked connections, source/destination IP, port, protocol, packet sizeNetwork attacks, DDoS, unauthorized access6 months
Application & API LogsUser actions, data access, error messages, API calls, input/outputOWASP compliance, app security6 months
Database LogsQueries, changes to data, permission access, exports of recordsHIPAA, financial data, PDP Law12 months
Backup & Change LogsChanges to backup schedules, deletions of snapshots, configuration editsRansomware protection, integrity checks12 months
Security Service LogsWAF blocks, virus scans, vulnerability scans, policy violationsAll security audits6 months

Critical Note: For Indonesia’s PDP Law, any log that contains personal data must be kept for at least 7 years if it relates to privacy incidents — confirm your retention policy with your legal team.


Best Practices for Secure Log Management

Logs are only useful if they are complete, accurate, and cannot be tampered with. Follow these rules strictly:

1. Enable Logs by Default — Never Disable Them

  • Turn on every log type available before you deploy any resource
  • Never turn off logs to save storage space — log storage costs are extremely low (less than IDR 100,000 per month for most businesses)
  • If a log creates too much data, filter it at the analysis stage — do not stop recording it

2. Centralize All Logs in One Place

Storing logs separately on each service makes searching and investigation impossible.

  • Send all logs from AWS, Azure, Google Cloud, apps, and networks to one central repository
  • This lets you trace an attack that moves between systems in one view

3. Protect Logs From Attackers

Attackers always try to delete logs to hide their tracks — protect your logs better than your production data:

Table

Protection RuleExplanation
Immutable StorageOnce written, logs cannot be edited, overwritten, or deleted — use WORM (Write Once Read Many) storage
Separate LocationStore logs in a different cloud account or region — attackers cannot reach them even if they take over your main system
Restricted AccessOnly 1–2 senior admins can view logs — no one else can read, modify, or delete them
Encrypt EverywhereEncrypt logs in transit and at rest — use your own encryption keys
Versioning EnabledKeep previous versions of log files in case new entries are corrupted

4. Standardize Log Format

Use consistent fields for every log entry:

  • Timestamp (in UTC)
  • Source IP address
  • User/account ID
  • Action performed
  • Resource affected
  • Success/failure status

This lets tools search and compare data automatically.


Effective Monitoring: What to Watch & How to Set Alerts

Collecting logs is useless if you do not watch for signs of trouble.

Key Events That Require Immediate Alerts

Configure high-priority notifications for these events — they indicate almost certain risk:

  1. Root or super-admin account login — especially from a new IP or country
  2. MFA disabled or authentication settings changed
  3. Bulk deletion of files, backups, or logs
  4. More than 5 failed login attempts in 10 minutes
  5. Security groups or firewalls opened to 0.0.0.0/0
  6. Changes to encryption keys or access policies
  7. Unusual bulk download of data (more than 1GB in one session)
  8. Creation of new admin accounts outside business hours

How to Avoid Alert Fatigue

Too many alerts make teams ignore real dangers — tune your system like this:

Table

RuleAction
CriticalSend SMS, WhatsApp, and email — respond within 15 minutes
HighSend urgent email and Slack — respond within 1 hour
MediumDaily summary report — review within 24 hours
LowWeekly report — review during scheduled maintenance

Tip: Test alerts weekly to ensure they reach the right people and are not filtered as spam.


Tool Comparison: Native vs Open Source vs Enterprise

Choose tools based on your size and needs — no need to overspend:

Table

Tool CategoryOptionsBest ForCostKey Strengths
Cloud Provider NativeAWS CloudTrail + CloudWatch, Azure Monitor, Google Cloud LoggingSmall teams, single-cloud setupFree + low storage feesFully integrated, no extra setup, compliant by default
Open Source / FreeWazuh, ELK Stack (Elasticsearch, Logstash, Kibana), Grafana + LokiMid teams, multi-cloud, limited budgetFree self-hostedFull control, customizable, no subscription fees
Enterprise SIEMMicrosoft Sentinel, Splunk, Datadog, Sumo LogicEnterprise, strict compliance, 24/7 threat huntingIDR 2–20 million/monthAI-powered anomaly detection, global threat intelligence, managed support

Recommendation: Start with your cloud provider’s native tools — they cover 90% of your needs for free. Add Wazuh or Grafana later if you need more features.


Step-by-Step Implementation Plan

Follow this roadmap to build a complete monitoring system in 4 weeks:

Table

WeekActions
Week 1Enable all audit logs, network logs, and authentication logs across all services; create a dedicated log storage bucket
Week 2Configure immutable storage, access restrictions, and encryption for logs; set up centralized log collection
Week 3Create critical alerts and notification channels; test that alerts are received correctly
Week 4Build basic dashboards for activity overview; document your process and run a test investigation
OngoingReview logs weekly, update alert rules monthly, test log integrity quarterly

Common Mistakes & Fixes

Table

MistakeRiskHow to Fix
Storing logs in the same account as productionAttackers can delete evidenceMove logs to a separate locked account
Using default log retention (7–14 days)Violates compliance rulesSet retention to minimum 6 months / 12 months for audit logs
Sending all alerts to one personMissed alerts if that person is awayUse group channels and rotate on-call staff
No test of log accessCannot find logs during an incidentPractice searching logs regularly
Logs in plain textExposes sensitive dataEnable server-side encryption for all logs

Conclusion

Security monitoring and logging are the foundation of all cloud security — without them, you are flying blind. They are also the most affordable protection you can implement: most features are free, and the cost of log storage is tiny compared to the fines and losses from a breach.

Start today by enabling all logs and locking down your log storage. Then build your alerts step by step. Over time, this system will give you proof of compliance, fast incident response, and the confidence that you can see exactly what is happening in your cloud environment at all times.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top