Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.3.1. Analyzing Resource Configuration and Permissions

First Principle: Most logging failures are caused by one of three things: missing IAM permissions, incorrect resource configuration, or disabled features. Systematic diagnosis starts by checking these three areas in order.

Common Logging Failures by Service:
ServiceCommon FailureRoot CauseFix
Lambda → CloudWatchNo logs appearExecution role lacks logs:CreateLogGroup, logs:PutLogEventsAdd CloudWatch Logs permissions to execution role
API GatewayNo access/execution logsLogging not enabled in stage settings, or IAM role missingEnable logging in stage, create API Gateway logging role
CloudFrontNo access logsAccess logging disabled, or S3 bucket ACL doesn't grant CloudFront writeEnable logging, fix S3 bucket ACL
Health checksFalse positivesSecurity group blocking health check trafficAllow health check source IPs in security group
CloudTrailMissing data eventsData events not enabled for the specific serviceEnable data events in Trail configuration
Systematic Troubleshooting Process:
  1. Verify the feature is enabled — Is logging turned on for the service?
  2. Check IAM permissions — Does the service role have write access to the log destination?
  3. Check the destination — Is the S3 bucket/CloudWatch log group accessible? Any resource policies blocking access?
  4. Check network path — Can the resource reach the logging endpoint? (VPC endpoints may be needed for private subnets)
  5. Check for encryption conflicts — If the destination uses KMS, does the source service have kms:GenerateDataKey permission?

⚠️ Exam Trap: A Lambda function in a VPC without a NAT Gateway or VPC endpoint for CloudWatch Logs will fail to send logs — silently. The function runs, returns results, but logs are lost because there's no route to the CloudWatch Logs endpoint.

Scenario: API Gateway access logs stopped appearing in CloudWatch 3 weeks ago. After investigation, you discover that someone rotated the API Gateway's logging IAM role, and the new role doesn't have logs:PutLogEvents permission.

Reflection Question: Why is IAM permission the first thing to check when a service stops sending logs, and how do you prevent recurrence?

Alvin Varughese
Written byAlvin Varughese
Founder15 professional certifications