Cloud concept · Updated

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

In short

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.

Cloud Concepts Hub →

6 key aspects of Audit Logging

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

01
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.

02
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.

03
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.

04
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.

05
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.

06
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 CloudTrailAWS 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.

Amazon S3Amazon 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.

AWS ConfigAWS 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.

Amazon AthenaAmazon 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.

Audit Logging exam questions

Real practice exam questions on Audit Logging, with the correct answer and its explanation. Answer them with every option in the exam simulator.

AIB-C01 (beta)

A research company operates a production AI application that reads confidential documents from Amazon S3 through dedicated workload roles. After a concern about unauthorized document use, investigators find records of bucket-policy changes but cannot establish which documents the application actually read. The company already retains AWS CloudTrail management events for one year. Leadership requires evidence identifying the workload role, document object, and time of each successful read for the same period, without retaining document contents in the evidence records. Which additional control should the AI business strategist require?

Show answerCORRECT ANSWER

Enable CloudTrail S3 object-level read data events for the relevant buckets and retain the records for one year in access-controlled storage alongside the existing management-event evidence.

S3 object-level data events provide evidence of object access, including the requesting identity, object, and event time, without recording the document contents. Retaining these records complements the existing management events, which establish changes to permissions and configuration.

MLA-C02 (beta)

A company records management API activity for its Amazon SageMaker AI workloads by using a trail that delivers logs to Amazon S3. For an upcoming audit period, security reviewers must be able to cryptographically verify whether any delivered log files were modified or deleted after delivery. The reviewers can store verification metadata in a location that workload administrators cannot modify. Which configuration meets this requirement?

Show answerCORRECT ANSWER

Enable CloudTrail log file integrity validation, preserve the signed digest files in the protected location, and run CloudTrail log validation for the audit period.

CloudTrail integrity validation produces signed digest files containing hashes of delivered log files. Validating the logs against protected digests provides cryptographic evidence of modification or deletion. Validation must be enabled before the period being audited; enabling it does not validate earlier deliveries retroactively.

SAP-C03

A company uses AWS Organizations to manage 50 application accounts across two AWS Regions. Applications make in-Region Amazon Bedrock InvokeModel and InvokeModelWithResponseStream requests with text inputs and outputs. An existing multi-Region organization trail delivers API activity records to a log archive account.

After an investigation, the security team discovers that the centralized records identify model API calls but do not contain the prompts or generated responses. The company must capture those contents for future invocations and maintain copies in an S3 bucket in the log archive account. Investigators must be able to correlate the contents with invocation metadata. Applications must continue calling Amazon Bedrock directly without code changes or an inference proxy.

An existing account-enrollment pipeline can deploy account-specific resources and settings in both Regions. Which solution meets these requirements?

Show answerCORRECT ANSWER

Use the enrollment pipeline to enable Amazon Bedrock model invocation logging with text delivery in each application account and Region. Deliver logs to same-account, same-Region S3 buckets, and configure S3 replication with the required permissions to copy them to the log archive bucket. Retain invocation request IDs for correlation.

Amazon Bedrock model invocation logging captures supported text inputs, outputs, and invocation metadata without application changes. It must be configured in each account and Region, and its S3 destination must be in that same account and Region. Replication provides centrally controlled copies in the log archive account, while request IDs support correlation with API activity records.

Practice Audit Logging in a full exam

Questions on Audit Logging in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Audit Logging

2 min read

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.

Learn Audit Logging in lessons

13 short lessons on Audit Logging in 9 certification courses.

and 7 more lessons

Open the lessons