Detection · Topic 7 of 7
Troubleshooting Detection Pipelines
Find out why CloudTrail, CloudWatch, EventBridge, GuardDuty and Security Hub pipelines stay silent, with a symptom to cause checklist and CLI commands.
- 5 min
- Troubleshoot in order: source, delivery, filter, action, person.
aws cloudtrail get-trail-statusshows whether a trail is logging and the latest delivery error.- CloudTrail delivery fails when the S3 bucket policy or the KMS key policy does not allow the CloudTrail service.
What it is
A detection pipeline has several stages: a source produces data, a log or event service collects it, a filter or rule evaluates it, and a notification reaches a person. The most dangerous failure is silence, because nothing tells you that the alert path is broken.
Troubleshooting means finding which stage stopped, and the exam rewards a method: start at the source and move one stage at a time toward the person.
How it works
Step 1: is the source producing data
Check that the service is on in the right account and Region. GuardDuty, Security Hub, Config and Inspector are all Regional, and member accounts must be enrolled with the delegated administrator.
For CloudTrail, confirm the trail is logging and look at its delivery errors.
# AWS CLI
aws cloudtrail get-trail-status --name org-trail
The output shows IsLogging, the time of the last delivery, and LatestDeliveryError when the bucket or key rejects delivery.
Step 2: is the data being delivered
| Symptom | Likely cause |
|---|---|
| No CloudTrail files in the bucket | Trail stopped, bucket policy does not allow cloudtrail.amazonaws.com, or the KMS key policy denies the service |
| No CloudTrail events in CloudWatch Logs | The trail has no log group role, or the role lacks permission to create streams and put events |
| No S3 object level events | Data events were never enabled for those buckets |
| Missing flow log records | Wrong IAM role, bucket policy missing, or traffic that flow logs do not capture |
| Logs stop after a key change | The KMS key was disabled, deleted or its policy changed |
| No logs from a member account | The account is not in the organization trail, or sends to the wrong bucket path |
Flow logs show a log status of NODATA when no traffic occurred and SKIPDATA when some records were skipped. Neither is an error in the log configuration.
Step 3: does the filter or rule match
Metric filters and event patterns fail quietly when the pattern is wrong.
- Test a metric filter pattern before saving it with
aws logs test-metric-filter, using sample log lines. - Remember that a metric filter only sees events that arrive after it exists.
- EventBridge patterns are case sensitive and match whole values. A rule for IAM changes must be in us-east-1.
- Check the rule is enabled, and that it is on the same event bus that receives the event.
- Look at the
TriggeredRulesandInvocationsmetrics in theAWS/Eventsnamespace to see whether the rule fires.
Step 4: can the action be called
When a rule matches but nothing happens, look at the target.
| Target | Common fault |
|---|---|
| SNS topic | Topic policy does not trust events.amazonaws.com, the email subscription is pending confirmation, or the KMS key blocks the publisher |
| Lambda | Missing resource policy, function error, or throttling |
| Systems Manager Automation | The rule role cannot pass the automation role |
| Cross account bus | Receiving bus policy does not allow the sender |
The FailedInvocations metric rises when EventBridge cannot deliver. A dead letter queue on the target keeps the failed events so that you can inspect them.
For alarms, read the alarm history.
# AWS CLI
aws cloudwatch describe-alarm-history --alarm-name RootAccountUsage \
--history-item-type Action
If the history shows a failed action, the alarm worked and the notification path failed. Also check that alarm actions are enabled, because a disabled action never runs.
Step 5: why the finding is missing
- GuardDuty may have created the finding and a suppression rule archived it. Look at archived findings.
- Security Hub control results depend on AWS Config recording. Without it, controls show no data.
- A cross Region aggregator only links Regions you choose, and the origin Region still needs the service enabled.
- Newly created accounts are not covered unless auto enable is set for the organization.
Using the tools
Use CloudTrail to see whether the API call happened and who made it. Use AccessDenied events in CloudTrail to see which permission blocked a service role, such as a Lambda role that cannot write to a log group. Use VPC Reachability Analyzer or flow logs only when the problem is network related.
What to remember for the exam
- Troubleshoot in order: source, delivery, filter, action, person.
aws cloudtrail get-trail-statusshows whether a trail is logging and the latest delivery error.- CloudTrail delivery fails when the S3 bucket policy or the KMS key policy does not allow the CloudTrail service.
- A metric filter does not process older events, and
aws logs test-metric-filterchecks a pattern. - EventBridge rule problems are usually pattern case, wrong Region, wrong bus or missing target permission.
- The
FailedInvocationsmetric and a dead letter queue reveal failed deliveries. - An SNS subscription must be confirmed, and a KMS encrypted topic needs a key policy for the publisher.
- GuardDuty suppression rules and missing Config recording explain many missing findings.
When the alarm history shows the alarm fired and the action succeeded but no email arrived, look at the SNS subscription and the mail provider, not at CloudWatch.
Common mistakes
Fixing the wrong stage. People rewrite a metric filter when the real fault is an SNS subscription still waiting for confirmation.
Testing with old events. A new filter does not match yesterday's log events, so generate a fresh test event.
Ignoring the Region. Many silent pipelines are simply built in a Region that does not receive the event.
Treating INSUFFICIENT_DATA as healthy. It means the alarm has no data to judge, not that all is well.
Changing or disabling a KMS key used by a trail, log group or SNS topic can stop delivery without any change to the logging service, so review key changes when logs go quiet.
Check yourself
Which command shows whether a trail is logging and why delivery failed?
aws cloudtrail get-trail-status, which returnsIsLoggingandLatestDeliveryError.An EventBridge rule matches but the SNS email never arrives. What do you check?
The topic policy for EventBridge, the subscription confirmation and the KMS key policy, and the
FailedInvocationsmetric.Why would GuardDuty show no finding for a known bad event?
The service may be off in that Region, the member may not be enrolled, or a suppression rule archived it.
Topic 7 of 7 in Detection
Test yourself on Detection
The full AWS SCS-C03 question bank has 858 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.