CLOUD CONCEPT

Audit Logging

Audit logging records attributable events about actions on systems and data so that activity can be investigated, verified, and reviewed.

Cloud Concepts Hub →

What is Audit Logging

Audit logging creates an evidence trail showing who or what performed an action, when it occurred, which resource was affected, and what the outcome was. In cloud environments, effective auditing requires selecting complementary log sources and protecting their delivery, retention, and accessibility across accounts, Regions, and workloads.

Audit logging supports accountability by recording security-relevant activity rather than only system health or application performance. Useful events identify the actor, action, target resource, timestamp, source context, and outcome. For cloud workloads, the actor might be a person, an assumed role, an application identity, or a managed service. Preserving role-session and identity-provider context helps investigators connect temporary credentials to the originating identity, although attribution depends on the information captured by each source.

Choose sources by starting with the questions an investigation or compliance review must answer. Control-plane API logs establish who changed permissions, created resources, or modified security settings. Data-plane audit events establish who accessed or changed supported data resources, such as objects in storage. Application audit logs capture business actions, such as approving a payment, that infrastructure logs cannot explain. Operating-system authentication logs, database audit logs, network flow logs, DNS query logs, and load balancer access logs provide complementary evidence. Network flow records describe connections, not the user actions or packet contents behind them.

For example, investigating a suspected object-storage disclosure requires more than the event that changed a bucket policy. Investigators may also need object-access events, identity activity, application records, and relevant network evidence. In AWS, CloudTrail management events and data events serve different purposes. Data events generally require explicit configuration and incur additional charges. CloudTrail Event history provides the previous 90 days of management events in each Region; it is not a complete, long-term archive of all activity.

Collection should cover the required accounts, Regions, resource types, and event categories. Organization-wide configuration and centralized storage reduce gaps caused by individually managed accounts. However, centralization alone does not guarantee completeness: selectors, unsupported event types, delivery permissions, encryption-key policies, service quotas, and configuration drift can all affect coverage. Test delivery using known actions, monitor delivery failures, and alert on attempts to disable logging or change its destinations. Do not assume logs arrive immediately or in chronological order.

Storage design follows investigation and retention requirements. Frequently searched records may belong in a searchable log platform, while an object-storage archive can provide economical long-term retention. Lifecycle policies can move older records to lower-cost storage, but retrieval delays and query compatibility must match recovery expectations. Restrict deletion and configuration changes, separate workload administration from archive administration, and use immutable retention where required. Encryption protects confidentiality, while integrity validation helps detect modification; neither substitutes for access control or deletion protection.

Audit records themselves can contain personal information, identifiers, and sensitive request details. Avoid recording credentials or unnecessary payloads, restrict analyst access, and define retention according to legal and operational requirements. More logging is not automatically better: high-volume data events increase ingestion, storage, and analysis costs. Select coverage deliberately, preserve original records alongside normalized copies, and maintain reliable timestamps for correlation. Finally, logging is not detection by itself. Queries, alerts, investigation procedures, and regular coverage tests turn retained records into useful security evidence.

Key aspects of Audit Logging

Effective audit logging combines appropriate sources, attributable events, verified collection, protected retention, and usable investigation workflows.

Requirement-driven source selection

Map each investigation question to the sources that can answer it. Combine control-plane activity, data access, application actions, and supporting network or host evidence rather than expecting one log to provide complete visibility.

Attribution and event context

Capture identity, session information, action, resource, timestamp, source context, and outcome where available. Preserve correlation identifiers so investigators can connect events across identity providers, applications, and infrastructure.

Complete and verifiable collection

Define coverage across accounts, Regions, resources, and event categories, including categories that require explicit enablement. Generate test events and monitor delivery failures and logging configuration changes.

Protected evidence

Separate permissions for generating, administering, reading, and deleting audit records. Combine encryption, restrictive access, integrity checks, and immutable retention when required; each addresses a different risk.

Retention and retrieval design

Choose storage according to retention periods, search frequency, and acceptable retrieval delays. Balance searchable storage against archival cost, and ensure lifecycle transitions do not undermine investigation requirements.

Operational use and privacy

Connect audit records to alerting, investigation workflows, and periodic review. Minimize sensitive content and restrict access without removing the evidence needed for accountability.

Cloud services for Audit Logging

AWS CloudTrail supplies supported API activity, while application, operating-system, and other service logs add context that API records cannot provide. Amazon S3 can hold a centralized, access-controlled archive with lifecycle and retention protections. Amazon CloudWatch Logs supports operational searches and alerting for delivered events, while Amazon Athena supports SQL investigations over archived records. AWS Config adds resource configuration history to help explain the effects of recorded actions. Together, these services separate event generation, collection, evidence storage, and analysis; engineers must still verify coverage, delivery permissions, retention settings, and investigation access.

AWS CloudTrail image AWS CloudTrail

Records supported AWS account activity, including management events and explicitly selected data events. Configure trails for ongoing delivery to Amazon S3, use organization and multi-Region coverage where appropriate, and enable log file integrity validation when evidence verification is required.

Open AWS CloudTrail →
Amazon Simple Storage Service image Amazon S3

Provides durable storage for centralized audit archives, with access policies, encryption, and lifecycle management. S3 Object Lock can enforce write-once-read-many retention for protected object versions when configured appropriately.

Open Amazon S3 →
AWS Config image AWS Config

Records configuration history for supported resource types that are enabled for recording. It complements activity logs by showing resource state and changes, but it does not replace API audit records or data-access logging.

Open AWS Config →
Amazon Athena image Amazon Athena

Queries audit records stored in Amazon S3 using SQL without requiring a continuously running query cluster. Appropriate schemas, partitioning, and supported compressed formats help control scan costs and investigation time.

Open Amazon Athena →