SEC04-BP01SecuritySEC44 of 4 practices publishedReference content

Configure service and application logging

Framework question: How do you detect and investigate security events?

Risk if not established
High
Framework verified
23 Oct 2026

AWS Well-Architected Framework — SEC04-BP01 Configure service and application logging

Executive summary

Why this practice matters

Turn on the logs you would need to reconstruct what happened in a security incident, from cloud account activity through to applications. Decide in advance which sources to collect, where to keep them, for how long and who can read them. Logs you did not collect cannot be recovered after the event, so the choices have to be made before you need them.

Business impact

  • Lets you reconstruct the scope and timeline of an incident instead of guessing.
  • Provides evidence for audits and for regulatory and contractual obligations.
  • Feeds the alerts that tell you something has happened.
  • Avoids paying to store logs nobody will use, while keeping the ones that matter.

Assign

Accountable and responsible roles

Responsibilities are held separately from roles, so accountability type and typical roles are stated explicitly.

ResponsibilityAccountability type

Decide log sources, retention and access

Select log sources from the use cases the business needs, and set retention, access and integrity rules.

Typical roles: Security Engineer, Security Operations / Incident Response, Security Engineer, Security Operations Lead

responsible

Enable and maintain logging

Turn on service, network and application logging through code or policy so new accounts and workloads are covered automatically.

Typical roles: Cloud / Platform Engineer, DevOps Engineer, Cloud Platform Engineer, DevOps Engineer

responsible

Provide application logs and context

Workload teams decide what their applications log and tell security which events matter.

Typical roles: Software Engineer, Service Owner, Software Engineer, Service Owner

consulted

Assessment

Assessment and evidence state

States describe how far the practice has moved from intent to something continuously validated.

  1. 0

    Not Assessed

    Logging coverage has not been reviewed.

    Indicators

    • No inventory of log sources exists.
  2. 1

    Not Implemented

    Logging is incidental and not planned.

    Indicators

    • Logs depend on service defaults.
    • Nobody knows which accounts are covered.
  3. 2

    Partially Implemented

    Core logs exist, but coverage, retention and access are inconsistent.

    Indicators

    • Account activity logging is on, but network, DNS and application logs are patchy.
    • Retention is set by defaults rather than requirements.
  4. 3

    Implemented

    Relevant logs are collected, retained and protected on purpose, and can be queried when needed.

    Indicators

    • Log sources, retention and access are documented and approved.
    • New accounts inherit logging automatically.
  5. 4

    Continuously Validated

    Coverage, retention and integrity are monitored continuously and tested against realistic investigations.

    Indicators

    • Coverage is checked automatically and gaps raise alerts.
    • Retrieval and integrity are tested routinely.

Assessment dimensions

  • Log coverage

    Practice-specific

    Patchy · Core sources · All required sources

  • Retention rationale

    Practice-specific

    Default · Partly justified · Requirement-based

  • Access and integrity

    Practice-specific

    Open · Restricted · Restricted and verified

  • Retrieval and querying

    Practice-specific

    Untested · Ad hoc · Tested regularly

Caution

Logging switched on is not the same as logs you can use. The evidence should show coverage across accounts, a reason and retention period for each source, protected access, and that the logs can actually be retrieved and queried.

Standard

What you should be able to demonstrate

Statements a reviewer should be able to confirm from evidence, not from intent.

  • Account activity, network, DNS and key service logs are turned on for every account, in a way that new accounts inherit.
  • Each log source has a stated reason, a storage location and a retention period based on requirements rather than defaults.
  • Operating system and application logs are collected where they help detect suspicious behaviour.
  • Access to logs is restricted, write and delete rights are limited, and integrity is checked routinely.
  • Logs can be queried quickly with tools chosen to suit the security team, and alerts are built from them.

Trade-offs to hold in view

  • Longer retention and wider collection improve investigations but raise storage and query costs, so collect by use case.
  • Network and application logs can be high-volume and costly; enabling them selectively controls cost but can leave blind spots.
  • More query tools can fit different cost and retention needs but slow investigators down, so keep the number small.

Assess

Questions to ask

Each question exposes the difference between an intention and an operating practice.

  • discovery

    Which accounts, services and applications are not producing the security logs we would need in an investigation?

    Finds coverage gaps before an incident does.

    Usually asked by: Cloud / Platform Engineer, Security Engineer

  • challenge

    For each log source, which requirement sets how long we keep it, and who can change or delete it?

    Tests whether retention and access are deliberate.

    Usually asked by: Security Engineer, Risk / Compliance / Governance

  • evidence

    What shows that logging is enabled across our accounts, and that we could retrieve last month's logs today?

    Logging only helps if it works and can be read.

    Usually asked by: Security Operations / Incident Response, Cloud / Platform Engineer

  • executive

    If we had a serious incident tomorrow, could we say what happened and when?

    Frames logging as the ability to answer for an incident.

    Usually asked by: Security Leader, Technology Executive

Evidence

Required and expected evidence

Reusable evidence definitions held once in the evidence library and referenced by every practice that relies on them. Each links to what good evidence looks like and to worked examples.

EVD-SEC-017coreReusable

Security Log Source & Retention Register

A register of the security logs the organisation collects: each log source, where it is stored, how long it is kept, who can read or change it, how its integrity is protected and what it is used for.

Use the Security Log Source & Retention Register as primary evidence of what is logged, where it is kept, for how long and who can access it.

Minimum expected content

  • Log sources in scope: account activity, network, DNS, load balancer and web filter, resource, operating system and application logs
  • Why each source is collected and the use cases it supports, such as investigation, alerting or compliance
  • Where each source is stored and in which account
  • Retention period and lifecycle rule for each source, and the requirement behind it
  • Split between logs kept readily searchable and logs archived
  • Who can read, query, change or delete the logs
  • How log integrity is protected and checked
  • Querying and alerting tools used for each source
  • Accounts, Regions and workloads covered, and known gaps
  • Date of the last review and who approved the log scope

Anti-patterns

  • Logs kept indefinitely, or deleted too soon
  • Everybody can read or alter the logs
  • Every type of log stored just in case
  • Logging switched on by hand, account by account
  • Log integrity checked only when something goes wrong
  • Log sources known only to the team that set them up

Review: Check coverage continuously through automated configuration checks, and review the register when workloads, accounts or obligations change and at least annually.

EVD-SEC-018supportingReusable

Centralised Security Data Platform Design

A design record for how security logs, findings and metrics are collected into standardised locations: the accounts that hold them, the sources and formats, regional and sovereignty choices, access controls and the tools that read them.

Use the Centralised Security Data Platform Design where logs are sent to a separate, protected location.

Minimum expected content

  • Accounts or locations that hold security data, and why they are separate from workloads
  • Sources publishing into the standard locations, and any not yet connected
  • Data formats and schemas used, and how data from other tools is normalised
  • Regions covered, including opted-in Regions not in active use
  • Data sovereignty, localisation and compliance constraints, and any extra locations they require
  • Access model: who and what can read, write and administer, and how tools reach the data across accounts
  • Retention and lifecycle rules, and how they link to the data classification policy
  • Tools that query, correlate and visualise the data, and how they are integrated
  • Controls protecting the integrity and availability of the data store
  • Owner, change process and date of the last review

Anti-patterns

  • Each team runs its own logging and metrics collection
  • Security data left in the account that produced it
  • No access controls limiting who can view or alter collected data
  • Security data outside the data classification policy
  • Sovereignty and localisation rules ignored
  • Custom transformation built for every source

Review: Review when accounts, Regions, tools or regulatory scope change, and at least annually.

EVD-DATA-001supportingReusable

Data Retention & Lifecycle Policy

A policy defining how long classes of data, backups, snapshots and retained objects must be kept, when they may or must be transitioned or deleted, and how lifecycle rules are implemented and reviewed.

Use the Data Retention & Lifecycle Policy to show how log retention periods were set.

Minimum expected content

  • Data/object class
  • Business/system scope
  • Retention purpose
  • Required minimum retention period
  • Maximum retention/deletion requirement where applicable
  • Legal/regulatory/contractual basis
  • Recovery/backup requirement
  • Storage class/tier transition rule where applicable
  • Deletion/disposal rule
  • Lifecycle automation/control location
  • Exception authority and expiry
  • Owner
  • Review cadence and version history

Anti-patterns

  • Keep everything forever just in case
  • Delete old data solely because storage is expensive
  • Backup retention is undefined
  • Lifecycle rules exist but are not mapped to policy requirements
  • Legal hold exceptions never expire
  • Different environments retain the same data indefinitely without rationale

Review: Review at least annually and when legal/regulatory, business, recovery or storage requirements materially change.

Diagnosis

Common evidence gaps

  • Coverage assumed, not checked

    Logging is believed to be on everywhere, but new accounts, Regions and services were never verified.

  • Retention by default

    Logs are kept for whatever period a service defaults to, or indefinitely, rather than for a stated reason.

  • Open or editable logs

    Many people can read, alter or delete security logs, including from the workloads that produce them.

  • Logs nobody can query

    Logs are stored but there is no tested way to search them quickly during an investigation.

Implementation

Implementation guidance

Choose sources from use cases

Start from the investigations, alerts and obligations you must support, then select account activity, network, DNS, load balancer, web filter and application logs to match, rather than collecting everything.

Turn on baseline logging everywhere

Enable account activity logging for every account, ideally through an organisation-wide trail, and turn on network and DNS logs for virtual networks.

Choose storage and retention

Use low-cost object storage for long retention and a log service for recent, searchable data, and set lifecycle rules per source from legal, regulatory and business needs.

Control access and integrity

Limit who can read, change or delete logs, keep them out of reach of the workloads that write them, and validate their integrity routinely.

Make logs queryable and actionable

Pick query tools that suit your security team, keep the number of tools small, and build alerts on the logs and on managed threat detection findings.

Measure

Measurements

  • Percentage of accounts and Regions with required baseline logging enabled.
  • Number of log sources with no documented reason or retention period.
  • Number of identities able to delete or alter security logs.
  • Time taken to retrieve and query a defined set of logs from beyond the readily searchable period.

Related

Outcomes and practices

Business outcomes

    Practices