CloudTrail is an AWS logging service that records API activity across an account or organization. It captures actions such as logins, key creation, permission changes, and service calls, creating an audit trail of who did what, when, and from where. Security teams use it to investigate suspicious access, confirm whether credentials were used, and reconstruct attacker behavior after an alert.
CloudTrail matters because cloud attacks often begin with valid identity material rather than malware. If an access key is exposed, defenders can search CloudTrail for unusual source IPs, new regions, privilege escalation, or unexpected API calls tied to that key. It is also useful for proving that a secret was never used, which helps narrow incident scope. In practice, CloudTrail is a core defense control: it supports detection, forensics, compliance, and fast rotation decisions when a credential leak is suspected.


