Know a company with years of records? Refer it and earn up to $100K
Security and cloud records

Audit Log Examples: Fields, SIEM Logs and CloudTrail

What an audit log is, with an example entry and fields, how audit logs differ from security and SIEM logs, what CloudTrail records, and retention rules.

Questions an entry must answer
4When, where, who, what (OWASP)
CloudTrail event history
90 daysManagement events, per Region
Cost and Usage Report updates
At least dailyUntil charges are finalized
A server rack with blue patch cables and a laptop showing a ticket queue
Short answer

An audit log is what a system keeps to show who did what, to which record, and when. NIST defines it as a chronological record of system activities. A typical audit log entry, for example, has a timestamp, an actor, an action, a target, an outcome and a source address. Security logs and SIEM logs are wider: they add events from firewalls, servers and security tools.

  • An audit log answers four questions for each event: when, where, who and what.
  • Audit logs are one kind of security log. A SIEM collects many kinds in one place.
  • CloudTrail event history covers the past 90 days of management events. Keeping more takes a trail or an event data store.
  • The AWS Cost and Usage Report is a billing record, not a security log, but it shows what ran and when.

What is an audit log?

NIST defines an audit log as "a chronological record of system activities, including records of system accesses and operations performed in a given period" (NIST glossary). In practice it is the list a system keeps of who signed in, what they viewed or changed, and when. It is also called an audit trail.

An audit log is written for accountability, not for debugging. NIST's log management guide describes operating system audit records as holding "security event information such as successful and failed authentication attempts, file accesses, security policy changes, account changes" and use of privileges (NIST SP 800-92). Most business software keeps a similar record for its own actions: a setting changed, a report exported, a user given a new role.

Audit log example: one entry and its fields

The audit log sample below is a single fictional entry from a web application: an administrator gives another user the admin role. OWASP's logging guidance says application logs must record "when, where, who and what" for each event (OWASP), and the fields map onto those four questions.

FieldQuestion it answersIn the example
timestampWhen14 March 2026, 09:42:17 UTC
actorWhoUser u_4821
actionWhatA role was updated
targetWhat it was done toUser u_5190
changesWhat changedRole went from member to admin
outcomeWhether it workedSuccess
source_ip, user_agentWhere fromOne address and one browser
event_id, request_idHow to find it againUnique IDs that tie the entry to other logs
One audit log entry in JSON
{
  "timestamp": "2026-03-14T09:42:17Z",
  "event_id": "evt_7Q2M4X91",
  "actor": { "type": "user", "id": "u_4821", "email": "j.rivera@example.com" },
  "action": "role.update",
  "target": { "type": "user", "id": "u_5190" },
  "changes": { "role": { "from": "member", "to": "admin" } },
  "outcome": "success",
  "source_ip": "203.0.113.24",
  "user_agent": "Mozilla/5.0",
  "request_id": "req_9f3c2a"
}

Fictional data written for this page. Field names vary by product, but the same questions are answered. A good entry records the old and new values, and never the password or token used.

How do audit logs differ from security logs and SIEM logs?

Security logs are the wider family. NIST says "a log is a record of the events occurring within an organization's systems and networks", and gives as common examples of computer security logs "audit logs that track user authentication attempts and security device logs that record possible attacks" (NIST SP 800-92). So an audit log is one kind of security log.

SIEM logs are whatever a security information and event management tool has collected. NIST defines a SIEM tool as an "application that provides the ability to gather security data from information system components and present that data as actionable information via a single interface" (NIST glossary). The SIEM does not create most of its logs. It gathers them, puts them in a common shape and raises alerts.

Log typeWho writes itTypical contentMain use
Audit logAn application, database or operating systemUser and admin actions with actor, target and outcomeAccountability and compliance evidence
Security logsFirewalls, endpoint tools, servers, identity systemsSign-in attempts, blocked traffic, malware detections, plus audit recordsDetecting and investigating attacks
SIEM logsCollected from all of the aboveNormalized events, correlation results and alertsOne place to search, alert and report
Application or debug logDevelopers, through the codeErrors, timings, stack tracesTroubleshooting

What do CloudTrail logs record?

CloudTrail is the audit log of an AWS account. AWS says "actions taken by a user, role, or an AWS service are recorded as events in CloudTrail", including actions taken in the console, the command line and the APIs (AWS CloudTrail User Guide). Each event is a JSON record. The record contents page lists the fields; the ones below do most of the work (CloudTrail record contents).

FieldWhat AWS says it holds
eventTime"The date and time the request was completed, in coordinated universal time (UTC)."
userIdentity"Information about the IAM identity that made a request."
eventSource"The service that the request was made to."
eventName"The requested action, which is one of the actions in the API for that service."
sourceIPAddress"The IP address that the request was made from."

The event history page in the console "only shows management events. It does not show data events, Insights events, or network activity events" (AWS). Management events are changes to resources, such as creating a user or deleting a server. Reads and writes of the data inside a resource are data events, and they are recorded only when a trail or event data store is set up to capture them.

What does the AWS Cost and Usage Report contain?

The AWS Cost and Usage Report (CUR) is a billing record, not a security log. AWS says it "contains the most comprehensive set of cost and usage data available" and that "each report contains line items for each unique combination of AWS products, usage type, and operation that you use in your AWS account" (AWS Cost and Usage Reports User Guide). Files are delivered to an S3 bucket the company owns and updated at least once a day until the charges are finalized.

Each line item is one row. Common columns include lineItem/UsageStartDate ("the start date and time for the line item in UTC"), lineItem/UsageAccountId, lineItem/ProductCode, lineItem/UsageType, lineItem/UsageAmount, lineItem/UnblendedCost and, if switched on, lineItem/ResourceId (line item details). Read next to CloudTrail, the report shows what each change to the infrastructure cost: one log says who started 40 servers, the other says what they cost per hour.

How long should audit logs be kept?

There is no single rule. NIST separates two ideas: "log retention is archiving logs on a regular basis as part of standard operational activities", while log preservation "is keeping logs that normally would be discarded, because they contain records of activity of particular interest" (NIST SP 800-92). The period comes from the laws, contracts and security standards that apply to the company, written into its retention policy. The data retention policy template shows one way to set it out.

Defaults are often shorter than people assume. CloudTrail event history "is limited to the past 90 days of events", and AWS adds that "for an ongoing record of events in your AWS account, create an event data store or a trail" (AWS). Some laws require the logging itself without naming a period: the HIPAA Security Rule requires mechanisms "that record and examine activity in information systems that contain or use electronic protected health information" (45 CFR 164.312(b)). This page is general information, not legal advice.

Common mistakes with audit logs

The same few gaps show up in most audits and incident reviews.

  • Relying on a default window, such as 90 days of event history, and finding the log gone when an investigation starts.
  • Logging the action but not the actor, the target or the old and new values.
  • Writing secrets into logs. OWASP lists access tokens, passwords, database connection strings and encryption keys among data that should not be recorded directly.
  • Letting administrators edit or delete the log they are recorded in.
  • Using local time or unsynchronized clocks, so events from two systems cannot be put in order.
  • Sending logs to a SIEM without keeping the original records needed as evidence.

Source: OWASP Logging Cheat Sheet

Are security logs and cloud bills also a data asset?

They can be. AI data buyers have asked Origin for records from B2B SaaS companies with 500 to 2,000 staff: code with git history, tickets, security logs and cloud bills. Logs and bills are useful together because they show how a real system was run, changed and paid for over time. For the neighboring record types, see security incident data, SOC case data, source code and agent traces.

Origin is an independent data partner. Your company decides what is shared and signs any license itself, and a buyer may pay Origin when a deal closes.

  • Secrets and credentials: scan logs, code and configuration for keys, tokens and passwords, and rotate any that are found.
  • Customer data: logs can carry customer names, tenant IDs, query text and file names. Remove or replace them.
  • Personal data in logs: employee emails, user names and IP addresses identify people and usually need masking.
  • Third-party and open-source license terms: check the terms of the security tools, cloud services and libraries the records came from.
  • Customer contracts: many SaaS agreements limit how customer usage data and logs may be used. Read them before any record leaves the company.
  • Cloud bills: account IDs, resource names and negotiated discount terms may be confidential under the cloud provider agreement.

Does your company hold records like these? See what your data is worth.

Common questions

What is an audit log used for?

An audit log is used to show who did what and when in a system. Teams use it to investigate incidents, prove to auditors that controls work, and trace a change back to the person or service that made it.

What should an audit log example include?

A useful audit log example includes a timestamp, the actor, the action, the target, the outcome and where the request came from. Unique event and request IDs let you match the entry against other logs.

What is the difference between an audit log and SIEM logs?

An audit log is written by one system about its own activity. SIEM logs are the collected events of many systems, gathered into one tool that searches them, links related events and raises alerts.

How long are CloudTrail logs kept by default?

CloudTrail event history keeps the past 90 days of management events in each Region. To keep events longer, or to record data events, create a trail that delivers to an S3 bucket or a CloudTrail Lake event data store.

Is the AWS Cost and Usage Report a log?

Not in the security sense. The AWS Cost and Usage Report is a billing record with one line item for each combination of product, usage type and operation. It shows what ran and what it cost, not who made a change.

Are security logs the same as audit logs?

No. Security logs is the wider term. It covers audit logs and also firewall, endpoint, identity and intrusion detection records. Every audit log is a security log, but not the other way round.

Sources and further reading

What is your company’s data worth?

AI companies pay $20K to $5M for company records. Six questions, no files.