Section: Exam Notes
Section: Practice Tests

Logging, Monitoring, and Detection in AWS

This section covers the following exam objective:

Domain 1: Detection
Task Statement 1.2: Design and implement logging solutions


1. Understanding Logging in AWS Security

Logging forms the foundation of detection in AWS. Without logs, there is no visibility into user activity, system behavior, or potential security threats. AWS provides multiple logging services that capture activity across accounts, networks, applications, and data layers.

In exam scenarios, you will typically need to:

  • Identify the appropriate log source
  • Select the correct storage solution
  • Design a centralized and scalable logging architecture

AWS Logging Strategy Overview

LayerLog TypeAWS Service
Account / APIAPI activity logsAWS CloudTrail
NetworkTraffic logsVPC Flow Logs, Transit Gateway Flow Logs
DNSQuery logsRoute 53 Resolver Logs
ApplicationApplication logsCloudWatch Logs
Data AccessObject-level logsS3 Access Logs, CloudTrail Data Events

2. Identifying Log Sources

Selecting the right log source depends on:

  • Threat model
  • System architecture
  • Compliance requirements

Key Log Sources

Log SourcePurposeExample Use Case
CloudTrailTracks API activityDetect unauthorized IAM actions
VPC Flow LogsCaptures network trafficIdentify suspicious IP communication
Route 53 Resolver LogsRecords DNS queriesDetect data exfiltration via DNS
S3 Access LogsTracks object accessMonitor sensitive data usage
ELB LogsRecords load balancer trafficAnalyze web traffic patterns
CloudWatch LogsStores application logsDebug and monitor applications

Exam Tip

Always enable CloudTrail across all regions to ensure complete visibility.


3. Configuring Logging for AWS Services

AWS enables automated and centralized logging configurations.

CloudTrail Best Practices

ConfigurationDescription
Organization TrailCaptures logs across all accounts
Multi-Region TrailEnsures global coverage
Log File ValidationDetects log tampering
S3 + KMS EncryptionSecures log storage

CloudWatch Logging Components

FeaturePurpose
Log GroupsStore logs for applications or services
Log StreamsSeparate log sources within a group
CloudWatch AgentSends logs from EC2 or on-premises systems

Centralized Logging Architecture

A recommended design includes:

  • A dedicated logging account
  • Centralized storage using Amazon S3
  • Access control via IAM policies and SCPs

Exam Insight

Centralized logging is a standard best practice for multi-account environments.


4. Log Storage and Data Lakes

Amazon Security Lake

  • Centralizes security logs across multiple accounts
  • Uses the Open Cybersecurity Schema Framework (OCSF)
  • Integrates with AWS services and third-party SIEM tools

S3-Based Log Data Lake

FeatureBenefit
ScalabilityVirtually unlimited storage
Durability99.999999999% durability
IntegrationWorks with Athena, Glue, and QuickSight

Third-Party Integrations

Common integrations include:

  • Splunk
  • Datadog
  • IBM QRadar

Exam Tip

Security Lake is often the preferred solution for modern centralized logging architectures.


5. Log Analysis Using AWS Services

CloudWatch Logs Insights

  • Enables real-time log querying using a SQL-like syntax
  • Ideal for troubleshooting and quick analysis

Amazon Athena

  • Queries logs stored in S3
  • Serverless and cost-effective for historical analysis

AWS Security Hub

  • Aggregates and normalizes security findings
  • Uses the AWS Security Finding Format (ASFF)

Service Comparison

ServiceBest Use Case
CloudWatch Logs InsightsReal-time debugging
Amazon AthenaHistorical log analysis
Security HubAggregation of security findings

6. Log Normalization, Parsing, and Correlation

Logs from different services often have inconsistent formats. Normalization helps:

  • Standardize log structure
  • Simplify correlation across services
  • Improve threat detection accuracy

Amazon OpenSearch Service

  • Provides full-text search capabilities
  • Enables log analytics dashboards
  • Functions similarly to a SIEM system

AWS Lambda for Log Processing

  • Transforms and enriches logs
  • Routes logs to downstream services

Amazon Managed Grafana

  • Visualizes logs and metrics
  • Integrates with CloudWatch and OpenSearch

Example Log Processing Pipeline

CloudTrail → S3 → Lambda → OpenSearch → Grafana


7. Network-Based Logging

VPC Flow Logs

Capture:

  • Source and destination IP addresses
  • Ports
  • Traffic status (accept/reject)

Transit Gateway Flow Logs

  • Monitor traffic between VPCs
  • Useful in multi-account architectures

Route 53 Resolver Logs

  • Capture DNS queries
  • Help detect data exfiltration and malicious domains

Threat Mapping

Threat TypeLog Source
Data exfiltrationRoute 53 logs
Lateral movementVPC Flow Logs
Unauthorized API callsCloudTrail
Suspicious trafficFlow Logs

8. Key Logging Architecture Pattern

Centralized Logging Pipeline

  1. CloudTrail logs → Amazon S3
  2. VPC Flow Logs → CloudWatch or S3
  3. Logs aggregated into Security Lake
  4. Analysis using Athena or OpenSearch
  5. Security Hub aggregates findings

9. Key Exam Tips

Tip 1: CloudTrail Configuration

Always select:

  • Multi-region trails
  • Organization-wide trails
  • Encrypted S3 storage

Tip 2: Centralized Logging

Use:

  • A dedicated logging account
  • S3-based data lake
  • Amazon Security Lake

Tip 3: Log Analysis Strategy

  • Real-time analysis → CloudWatch Logs Insights
  • Historical analysis → Amazon Athena

Tip 4: Network Threat Detection

  • VPC Flow Logs → Traffic monitoring
  • Route 53 Logs → DNS analysis

Tip 5: Log Correlation

Use:

  • OpenSearch
  • Lambda
  • Security Hub

Tip 6: SIEM Integration

Combine:

  • Security Lake
  • OpenSearch
  • Third-party tools

Tip 7: Data Protection

  • Encrypt logs using AWS KMS
  • Restrict access using IAM policies

Final Thoughts

Designing effective logging solutions in AWS requires a focus on visibility, centralization, and analysis.

For the exam, prioritize:

  • Selecting the correct log sources
  • Centralizing logs using S3 or Security Lake
  • Using Athena, CloudWatch, and OpenSearch for analysis
  • Correlating logs to detect and respond to threats effectively
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Hide picture