Troubleshooting Logging and Alerting Pipelines
This lesson explains how to troubleshoot monitoring and logging that does not work, logs that never arrive, alarms that stay silent and rules that never fire, which task 1.3 of the exam guide covers. Most failures come down to a missing service principal permission, a key policy, or an event arriving in an unexpected Region.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the common causes of log delivery failures for each source.
- Explain why alerts for global service events must be created in us-east-1.
- Diagnose an EventBridge rule that never fires.
Log delivery failures
Logs may fail to reach their destination for a small number of recurring reasons. The following table identifies the common cause and remedy for each source.
| Source | Common cause | Fix |
|---|---|---|
| CloudTrail to S3 | Bucket policy does not allow cloudtrail.amazonaws.com for the trail's aws:SourceArn; KMS key policy lacks CloudTrail | Update bucket and key policies; check the trail's LatestDeliveryError |
| CloudTrail to CloudWatch Logs | The trail's IAM role cannot logs:PutLogEvents | Fix the role or recreate it |
| VPC Flow Logs to CloudWatch Logs | Delivery role missing or not trusting vpc-flow-logs.amazonaws.com | Fix the role; check the flow log's DeliverLogsErrorMessage |
| Flow logs, Resolver logs, WAF to S3 | Bucket policy for delivery.logs.amazonaws.com missing (often after a policy was overwritten) | Restore the log delivery statements |
| ALB access logs to S3 | Bucket policy does not allow Elastic Load Balancing to write; SSE-KMS bucket | Grant the Regional ELB account or the log delivery service principal; ALB logs support only SSE-S3 |
| CloudWatch agent | Instance role lacks CloudWatchAgentServerPolicy; no route to endpoints; wrong config | Check amazon-cloudwatch-agent.log |
| Encrypted log group | Key policy does not allow logs.REGION.amazonaws.com | Add the service principal with the encryption context condition |
Why logs do not arrive
Alerts that never arrive
Security alerts can fail to arrive for several reasons. The following list describes the most common causes.
- EventBridge rule in the wrong Region: API events from global services (IAM, STS global endpoint, CloudFront, Route 53, Organizations) and AWS Health global events are delivered in us-east-1.
- Event pattern mismatch: test with the sandbox or
aws events test-event-pattern; checkdetail-typespelling and case. - Target permissions: SNS topic and SQS queue policies must allow
events.amazonaws.com; Lambda needs a resource policy; the rule'sFailedInvocationsmetric and a target DLQ reveal failures. - Encrypted SNS topics using the AWS managed
aws/snskey cannot receive from EventBridge or CloudWatch alarms; use a customer managed key whose policy allows those services. - Metric filters do not process past events, and their patterns must match the JSON structure exactly.
- Security Hub controls without data: AWS Config is not recording in that account or Region.
The following diagram matches each fault to its fix.

An IAM alert that never fires
An alert that never fires
A rule should notify the security team whenever someone creates an IAM access key. It was created in eu-west-1, where the company runs everything, and nothing ever arrives. Three problems are found in turn:
- IAM is a global service; its CloudTrail events reach EventBridge in us-east-1. The rule is recreated there (or in us-east-1 forwarding to a central bus).
- The SNS topic is encrypted with
aws/sns, which EventBridge cannot use. The topic is re-encrypted with a customer managed key whose policy allowsevents.amazonaws.comtokms:GenerateDataKey*andkms:Decrypt. - The topic policy allowed only the account root. A statement allowing
events.amazonaws.comto publish, conditioned on the rule's ARN, is added.
aws events put-rule --region us-east-1 --name iam-access-key-created --event-pattern '{
"source": ["aws.iam"], "detail-type": ["AWS API Call via CloudTrail"],
"detail": { "eventSource": ["iam.amazonaws.com"], "eventName": ["CreateAccessKey"] } }'
aws cloudwatch get-metric-statistics --region us-east-1 --namespace AWS/Events \
--metric-name FailedInvocations --dimensions Name=RuleName,Value=iam-access-key-created \
--start-time $(date -u -d '-1 hour' +%FT%TZ) --end-time $(date -u +%FT%TZ) --period 300 --statistics SumThe FailedInvocations metric confirms whether the rule matched but could not deliver, which separates pattern problems from permission problems.
An EventBridge rule for an IAM API call in eu-west-1 never matches. Why?
Show answer
Events from IAM and other global services reach EventBridge in us-east-1, so the rule must be created there.
Exam Tips
Remember for the exam
- Events from IAM and other global services reach EventBridge in us-east-1.
- SNS topics encrypted with aws/sns cannot receive from EventBridge or CloudWatch; use a customer managed key.
- If a rule matches but delivers nothing, check FailedInvocations and the target's resource policy.
- Flow log delivery to CloudWatch Logs needs a role trusted by vpc-flow-logs.amazonaws.com.
- ALB access logs support only SSE-S3 encrypted buckets and need ELB write permission.
- If CloudTrail stops delivering after enabling SSE-KMS, fix the key policy.