The cloud has one enormous gift for defenders: because every action is an API call, every action can be logged, in structured form, with the identity that made it. AWS CloudTrail, Azure's activity and sign-in logs, and Google Cloud Audit Logs are the flight recorders of your estate. The catch is that the recorder is only as useful as your decision to enable it, retain it, and actually look at it.

CloudTrail records the control-plane calls made in an AWS account: who called which API, when, from where, and whether it succeeded. Azure Activity Log and Microsoft Entra sign-in logs, and GCP's Admin Activity and Data Access audit logs play the same role on their platforms. Together they are the primary source of truth for cloud incident response, and when a breach happens, this is the record you reconstruct the timeline from.

Management events vs data events

Cloud Logging and Detection: CloudTrail and FriendsDiagram with these labels, in reading order: logged, unless off; ship immutable; paged; Every action; = an API call; CloudTrail / Activity /; Audit Logs; Central logging account; immutable, object-lock; SIEM + threat detection; Analyst paged; StopLogging /; disabled trail =; attacker goes dark.logged, unless offship immutablepagedEvery action= an API callCloudTrail / Activity /Audit LogsCentral logging accountimmutable, object-lockSIEM + threat detectionAnalyst pagedStopLogging /disabled trail =attacker goes dark
Every cloud action can be logged, if the recorder is on and protected.

A distinction trips up teams constantly. Management events (creating a role, changing a policy, launching an instance) are logged by a CloudTrail trail by default. Data events, reading an individual S3 object, invoking a specific Lambda, are high-volume, off by default, and billed per event. The gap matters: without data-event logging, you can see that a role was assumed but not necessarily which objects it then read. Deciding where you need object-level visibility is a design choice for each account.

Why it matters: Logging that is off, unretained, or unmonitored is indistinguishable from no logging at all, right up until the incident when you needed it and it was not there.

The signals worth alerting on

Raw logs are the substrate for detection and do not detect anything alone. Certain events are high-signal enough to alert on directly, and they map cleanly to attacker behavior:

  • Root / global-admin usage. The most privileged account should almost never act. Any use should page someone.
  • IAM changes. Trust-policy edits, policy attachments, access-key creation and login-profile resets, which are typical of privilege escalation.
  • Logging tampering. StopLogging, deleting a trail, or disabling audit logs is a near-certain sign someone wants to go dark. Alert on it and protect the logs from the identities they record.
  • Anomalous credential use. A role assumed from a new country, an access key used from an unfamiliar ASN, or a sudden burst of Describe and List calls, the reconnaissance that follows initial access.
  • Security-control changes. Security groups opened, public-access blocks removed, GuardDuty or Defender disabled.
A log event that should page someoneeventName: StopLogging userIdentity: assumed-role/deploy-runner sourceIPAddress: 203.0.113.24 # attacker disabling the flight recorder

Building detection that lasts

  • Centralize and protect logs. Ship every account's trail to a dedicated, locked-down logging account with object-lock or immutability, so an attacker who owns a workload cannot erase the evidence.
  • Turn on log-file integrity validation so tampering is detectable, and set retention to match your investigation and compliance needs.
  • Layer managed threat detection. GuardDuty, Defender for Cloud, and Security Command Center consume these logs and flag known-bad patterns you would otherwise write rules for yourself.
  • Route to a SIEM and write behavioral rules for the escalation and exfiltration patterns specific to your environment, then tune out the noise so real alerts are seen.

Cloud logging flips the usual asymmetry: the same API surface that lets an attacker act at machine speed also records every move they make. That advantage only exists if the recorder is running in every account, feeding somewhere someone watches. An account with logging disabled is a blind spot.

Back to the knowledge baseRequest an assessment