Troubleshooting Monitoring, Logging and Alerting
Troubleshooting monitoring, logging, and alerting is a core Domain 1 skill in SCS-C03 because detection controls only add value when telemetry reaches its destination and triggers the correct response. The exam expects you to diagnose why logs, findings, or alerts are missing, delayed, or incomplete. Permissions are the most common root cause. CloudTrail delivery to Amazon S3 requires a bucket policy that grants cloudtrail.amazonaws.com s3:PutObject, ideally scoped with aws:SourceArn conditions. If the bucket uses SSE-KMS, the key policy must also allow CloudTrail to use the key. VPC Flow Logs and Route 53 Resolver query logs need an IAM role or resource policy that permits delivery to CloudWatch Logs or S3. The CloudWatch agent on EC2 needs an instance profile with CloudWatchAgentServerPolicy, a valid agent configuration file, and network reachability through VPC endpoints or a NAT gateway. Configuration gaps are another frequent issue. CloudTrail records management events by default, but data events such as S3 object-level actions and Lambda invocations must be enabled explicitly. Multi-Region trails and organization trails ensure coverage across all accounts. GuardDuty and Security Hub must be enabled in every Region and linked to a delegated administrator. AWS Config must record the relevant resource types for its rules to evaluate them. Alerting failures often come from EventBridge rules with incorrect event patterns or rules in the wrong Region. For example, events from global services such as IAM are delivered in us-east-1. SNS topics need an access policy that allows EventBridge or CloudWatch to publish. Encrypted topics also need KMS key policy permissions for the publishing service. CloudWatch alarms may remain in INSUFFICIENT_DATA when metric filters do not match the log format or when missing-data treatment is misconfigured. Useful troubleshooting tools include CloudTrail Lake and Amazon Athena for querying logs, and CloudTrail log file integrity validation for confirming log authenticity. Other aids are the CloudWatch agent logs, EventBridge FailedInvocations metrics, dead-letter queues, and the IAM policy simulator for permission errors. Also remember normal delivery latency (CloudTrail events typically arrive within about five minutes) and check service quotas before assuming a misconfiguration.
Troubleshooting Monitoring, Logging and Alerting (AWS Certified Security - Specialty)
In the Security Logging and Monitoring domain of the AWS Certified Security - Specialty exam, you are expected to design logging and monitoring solutions. You are also expected to find and fix them when they fail. Troubleshooting monitoring, logging and alerting means diagnosing why logs are missing, why metrics are not produced, why alarms do not fire, or why notifications never reach the security team. Then you choose the correct, least-privilege fix.
Why It Is Important
A security control that silently fails is worse than no control at all, because it creates false confidence. Consider these failures:
- If a CloudTrail trail stops delivering to Amazon S3, API activity goes unrecorded. Incident responders then lose their audit trail.
- If a GuardDuty finding never reaches the on-call engineer, an active compromise can continue for days.
- Compliance frameworks such as PCI DSS, HIPAA and SOC 2 require continuous, tamper-evident logging. Gaps can lead to failed audits.
- Attackers often try to disable or tamper with logging, for example by calling StopLogging, DeleteTrail or PutEventSelectors. You must detect and recover from this.
For these reasons, AWS weighs this skill heavily. Many scenario questions describe a broken pipeline and ask for the most likely cause or the best fix.
What It Is
Troubleshooting in this area covers the full pipeline. Every pipeline has the same four stages:
1. Source: CloudTrail, VPC Flow Logs, CloudWatch agent, ELB/ALB access logs, S3 server access logs, CloudFront logs, Route 53 Resolver query logs, WAF logs, AWS Config, GuardDuty, Inspector, Macie and Security Hub.
2. Transport and permissions: IAM roles, service-linked roles, resource-based policies (S3 bucket policies, KMS key policies, SNS topic policies, CloudWatch Logs resource policies), VPC endpoints and network paths.
3. Destination and storage: S3 buckets, CloudWatch Logs log groups, Kinesis Data Streams, Amazon Data Firehose, OpenSearch Service, Security Lake and cross-account log archive accounts.
4. Analysis and alerting: CloudWatch metric filters, CloudWatch alarms, EventBridge rules, SNS topics, Lambda functions, Athena queries and Security Hub insights.
A failure at any stage breaks the chain. Your job is to locate the broken link.
How It Works: Common Failure Points and Fixes
1. AWS CloudTrail
- Logs not arriving in S3: The bucket policy must allow the principal cloudtrail.amazonaws.com to call s3:GetBucketAcl on the bucket. It must also allow s3:PutObject on the AWSLogs/account-id/ prefix, with the condition s3:x-amz-acl = bucket-owner-full-control. For cross-account or organization trails, the policy must include every source account ID or the organization path. Using aws:SourceArn or aws:SourceAccount conditions is a best practice, but a wrong value blocks delivery.
- SSE-KMS encrypted trail failing: The KMS key policy must allow cloudtrail.amazonaws.com to call kms:GenerateDataKey*. Readers of the logs need kms:Decrypt. A missing Decrypt permission explains why analysts can see objects but cannot open them.
- Events missing: Check the following:
- Is the trail logging at all? Run GetTrailStatus and look at IsLogging and LatestDeliveryError.
- Is it a multi-region trail? Single-region trails miss activity in other regions.
- Are data events enabled? S3 object-level calls and Lambda Invoke are not logged by default.
- Are global service events (IAM, STS, CloudFront) included? These are recorded in us-east-1.
- Delivery to CloudWatch Logs failing: The trail needs an IAM role that CloudTrail can assume. That role needs logs:CreateLogStream and logs:PutLogEvents on the target log group.
- Event History versus trails: Event History shows only 90 days of management events. Longer retention needs a trail or CloudTrail Lake.
- Integrity: Enable log file validation. Use aws cloudtrail validate-logs to prove that files were not modified or deleted.
2. CloudWatch Logs and the CloudWatch Agent
- Agent installed but no logs: The EC2 instance profile needs CloudWatchAgentServerPolicy, or at least logs:PutLogEvents, logs:CreateLogStream and logs:CreateLogGroup. Also check these causes:
- The agent configuration file points to the wrong file path.
- The agent is not running.
- The instance clock is skewed.
- A private subnet has no NAT gateway and no interface VPC endpoint for CloudWatch Logs (com.amazonaws.region.logs).
- Log group encrypted with KMS: The key policy must allow the service principal logs.region.amazonaws.com to use the key. Otherwise, writes fail.
- Subscription filters: Streaming to Kinesis, Firehose or Lambda requires a role or resource policy that lets CloudWatch Logs write to the destination. Cross-account streaming also requires a destination with a destination access policy.
- Retention: Logs that seem to vanish may simply have aged out under a short retention setting.
3. Metric Filters and Alarms
- Metric filters apply only to log events ingested after the filter is created. They do not backfill historical data. This is a classic exam trap.
- A wrong filter pattern means the metric is never incremented. Common causes are case sensitivity and wrong JSON field names, such as $.eventName versus $.EventName.
- Alarm stuck in INSUFFICIENT_DATA: The metric is not being published. Other causes are a dimension or namespace mismatch, or a period that is too short. For sparse security metrics, set treat missing data to notBreaching or to the behavior you want.
- Alarm in ALARM state but no notification: Check that the SNS topic exists and that its access policy allows cloudwatch.amazonaws.com to publish.
- Encrypted SNS topic: If the topic is encrypted with the AWS managed key (alias/aws/sns), CloudWatch alarms and EventBridge cannot publish to it. Use a customer managed KMS key whose key policy grants kms:Decrypt and kms:GenerateDataKey* to the publishing service principal.
4. Amazon EventBridge
- Rule never triggers: Common causes include:
- The event pattern does not match the real event. Compare the pattern against a sample event from the console.
- The rule is in the wrong region. GuardDuty, Security Hub and most service events are regional.
- The API call is not recorded by CloudTrail. EventBridge rules for AWS API Call via CloudTrail need an active trail.
- The rule is for IAM or other global services but is not in us-east-1.
- Rule triggers but the target does nothing: The target needs a resource-based policy that allows events.amazonaws.com. Examples are Lambda permissions, SNS topic policies and SQS queue policies. Some targets, such as Kinesis, Step Functions and SSM Automation, need an IAM role instead.
- Use the rule's FailedInvocations metric and configure a dead-letter queue to capture failures.
5. Amazon SNS
- Email subscriptions remain in PendingConfirmation until the recipient confirms.
- Check delivery status logging and the NumberOfNotificationsFailed metric.
- A topic policy may restrict publishers by source ARN or account.
6. VPC Flow Logs, ELB, S3 and Other Service Logs
- VPC Flow Logs to CloudWatch Logs: An IAM role must trust vpc-flow-logs.amazonaws.com and allow logs:PutLogEvents. Flow logs to S3 need a bucket policy for delivery.logs.amazonaws.com.
- Flow logs do not capture some traffic. Examples are traffic to the Amazon DNS server, instance metadata (169.254.169.254), Amazon Time Sync, DHCP and Windows license activation. Flow logs also never show packet payloads. Use Traffic Mirroring for payload inspection.
- ALB/CLB access logs: The bucket policy must allow the regional Elastic Load Balancing account or the logdelivery.elasticloadbalancing.amazonaws.com principal. The bucket must use SSE-S3; SSE-KMS is not supported for ALB access logs.
- S3 server access logs: These are best-effort and can be delayed. The target bucket must grant the logging.s3.amazonaws.com service principal. Never log a bucket to itself, because that creates a loop.
- WAF logs: The destination name must start with aws-waf-logs-.
- Route 53 Resolver query logs must be associated with the correct VPC.
7. Detection Services
- GuardDuty: It is regional, so you must enable it in every region. In AWS Organizations, use a delegated administrator and auto-enable for new accounts. If findings stop appearing for member accounts, check membership status. GuardDuty analyzes CloudTrail, VPC Flow Logs and DNS logs through independent streams, so you do not need to enable those yourself.
- Security Hub: It requires AWS Config to be enabled and recording in each account and region, or security standard controls show no data. Use cross-region aggregation for one consolidated view.
- AWS Config: If no configuration items appear, check these causes:
- The configuration recorder is stopped.
- Resource types are excluded.
- The delivery channel bucket policy is wrong.
- The service-linked role is missing.
- Macie and Inspector: Check that they are enabled in each region and account. Inspector EC2 scanning needs the SSM agent and an instance profile with SSM permissions, or agentless scanning.
8. Centralized and Cross-Account Logging
- Organization trails write to a log archive account. The bucket policy and KMS key policy must trust the organization, using aws:PrincipalOrgID or the organization path.
- Protect logs with S3 Object Lock, MFA Delete, versioning and SCPs that deny cloudtrail:StopLogging, cloudtrail:DeleteTrail and config:StopConfigurationRecorder.
- Use Athena with partition projection to query large log sets. Slow or costly queries often point to missing partitions.
A Systematic Troubleshooting Method
1. Confirm the source is generating data. Is the service enabled, in the right region, and with the right event types?
2. Check the identity that writes the data. This is a service principal or an IAM role. Does it have permission, and can it be assumed?
3. Check resource policies at the destination. These are bucket, key, topic, log group and Lambda policies.
4. Check encryption. Does the KMS key policy allow the service to use the key?
5. Check the network path for agents: VPC endpoints, NAT, security groups and endpoint policies.
6. Check filters, patterns and thresholds in the analysis layer.
7. Check the notification channel. Look at subscriptions, confirmations and delivery failures.
8. Use the built-in diagnostics. These include CloudTrail GetTrailStatus, the CloudWatch agent log (amazon-cloudwatch-agent.log), EventBridge FailedInvocations, SNS delivery logs, CloudTrail AccessDenied events and IAM Access Analyzer.
Exam Tips: Answering Questions on Troubleshooting Monitoring, Logging and Alerting
- Read for the symptom. Words such as no logs appear, alarm never fires, notification not received or can see objects but cannot read them each point to a different stage of the pipeline.
- Think about permissions first. Most wrong-pipeline scenarios come down to a missing bucket policy, key policy, topic policy or IAM role. When KMS appears in the question, suspect the key policy.
- Remember the encrypted SNS trap. CloudWatch alarms and EventBridge cannot publish to SNS topics that use the AWS managed key. The answer is a customer managed key with the right key policy.
- Metric filters are not retroactive. If a question asks why past events are not counted, this is the reason. Use CloudWatch Logs Insights or Athena for historical searches.
- Watch for region traps. GuardDuty, Security Hub, Config and EventBridge are regional. IAM and other global service events are logged in us-east-1. A rule in the wrong region never matches.
- Data events are off by default. Missing S3 GetObject or Lambda Invoke records mean data events were not configured.
- Private subnets need endpoints. An agent in a subnet with no internet path needs interface VPC endpoints for CloudWatch Logs or Monitoring, or SSM.
- Security Hub needs Config. Empty compliance results usually mean AWS Config is not recording.
- Prefer the least-privilege, AWS-native, least-operational-overhead answer. For example, prefer adding a specific service principal to a policy over granting s3:* to everyone. Prefer an organization trail over per-account scripts. Prefer a delegated administrator over manual enablement.
- Eliminate distractors. Rule out answers that weaken security, such as disabling encryption, making a bucket public or removing conditions. Also rule out answers that add needless services, such as a custom Lambda poller when an EventBridge rule would work.
- For tamper detection, look for CloudTrail log file validation, S3 Object Lock, SCPs that block StopLogging, and EventBridge rules on CloudTrail configuration changes. AWS Config rules such as cloudtrail-enabled also help.
- Know the latency facts. CloudTrail typically delivers within about 5 minutes. S3 server access logs are best-effort. Flow logs aggregate over 1 or 10 minute intervals. A question that expects real-time results from these sources may be testing that you understand the delays.
- When two answers both work, choose the one that fixes the root cause rather than a workaround. Also favor the one that scales across accounts and regions.
Summary
Troubleshooting monitoring, logging and alerting means following data from source to destination to notification, and checking permissions, encryption, region, network and configuration at each step. Master the common failure patterns: missing bucket or key policy statements, the encrypted SNS limitation, metric filter behavior, data event settings, regional scope and the Security Hub dependency on Config. With these, you will be able to spot the broken link in most exam scenarios and choose the secure, scalable fix.