Troubleshooting AWS Applications: Common Errors, Throttling, Timeouts, Permissions and a Debugging Playbook

AWS Developer Associate 55 min min read Updated: Nov 17, 2026 Advanced
Troubleshooting AWS Applications: Common Errors, Throttling, Timeouts, Permissions and a Debugging Playbook
Advanced Topic 3 of 3

A Debugging Method

  1. Define the symptom: what exactly fails, since when, for whom, what changed (deployment, config, traffic)
  2. Find the layer: client, edge (CloudFront/WAF), API, compute, data store, network, permissions
  3. Check dashboards and alarms: errors, latency, throttles, saturation
  4. Read logs (CloudWatch Logs Insights) and traces (X-Ray) for the failing request id
  5. Check recent changes in CloudTrail and CloudFormation events
  6. Form a hypothesis and test one change at a time
  7. Fix, verify, add an alarm or test so it is caught earlier next time

Lambda

SymptomLikely causeFix
Task timed out after 3.00 secondsTimeout too low or slow dependency (cold start, DB, external API, VPC without NAT)Raise timeout and memory, add client timeouts, check VPC routes and endpoints, trace calls
Runtime.ImportModuleError / Cannot find moduleWrong handler path, missing dependency in the package or layer, wrong architecture buildCheck handler string, package contents, build with sam build --use-container
AccessDeniedException calling another serviceExecution role lacks permission (or a KMS permission)Add the exact action and resource to the execution role
Caller sees AccessDenied invoking LambdaMissing resource policy permission for the caller (S3, API Gateway, SNS...)aws lambda add-permission
TooManyRequestsException (429), Throttles metricAccount or reserved concurrency exhausted, burst limitRaise limits, remove too-low reserved concurrency, smooth with SQS, provisioned concurrency
Out of memory (Runtime exited ... signal: killed)Memory too low or large payload in memoryIncrease memory, stream data, check REPORT Max Memory Used
Function works when invoked manually but not from the eventEvent shape differs, wrong trigger, permission, filterLog the event, check trigger configuration and CloudWatch logs
Duplicate processingAt-least-once delivery, retriesMake handler idempotent (conditional writes, idempotency keys)
Async invocation lost eventsRetries exhausted, no destinationConfigure DLQ / on-failure destination
VPC function cannot reach internet or AWS APIsPrivate subnet without NAT or endpointAdd NAT gateway or VPC endpoints
Stream (Kinesis/DynamoDB) processing stuckA bad record fails the batch repeatedlyBisectBatchOnFunctionError, max retries, on-failure destination, check IteratorAge

API Gateway

CodeCheck
403 Missing Authentication TokenWrong URL or method or stage not deployed (REST). Resource does not exist
403 ForbiddenAuthorizer deny, resource policy, WAF block, missing API key
401Token missing/expired/wrong audience
429Throttling or usage plan quota. Add backoff, raise limits
502Malformed Lambda response (wrong proxy format) or Lambda crash
504Integration slower than the timeout (29 s default). Use async patterns
CORS error in browserMissing CORS headers on the response (also on 4xx/5xx) or OPTIONS route

DynamoDB

SymptomCause and fix
ProvisionedThroughputExceededExceptionOver capacity or hot partition. Use on-demand, adaptive capacity, better keys, caching (DAX), SDK backoff, spread traffic
ValidationExceptionReserved word without #name, wrong types, missing key, item over 400 KB, empty string key value
ConditionalCheckFailedExceptionCondition not met. This is often expected (duplicate or concurrent update)
TransactionCanceledExceptionRead CancellationReasons for the failing item
Query returns fewer items than expected1 MB page limit: use LastEvaluatedKey. Filter expressions run after reading
Stale read right after writeEventual consistency. Use ConsistentRead=True (not on GSIs)
GSI write throttling slows the tableUnder-provisioned GSI capacity

Messaging and Streams

SymptomCause and fix
SQS messages processed twiceVisibility timeout shorter than processing time, at-least-once delivery. Increase timeout, idempotent consumer
Messages go to DLQ unexpectedlymaxReceiveCount too low, consumer error, poison message
Queue growsConsumers too slow or failing. Scale consumers, check Lambda concurrency and errors
SNS to SQS no deliveryMissing queue policy allowing the topic, wrong filter policy
Kinesis ProvisionedThroughputExceededShard limit or hot key. More shards, better partition key, backoff, on-demand mode
Kinesis consumer lagHigh IteratorAge. Increase parallelization factor, shards, optimize consumer

Permissions: S3, KMS and Cross-Account

  • **S3 AccessDenied on an existing object: check IAM, bucket policy (explicit deny), Block Public Access, Organizations SCP, KMS key permissions** (kms:Decrypt), VPC endpoint policy, and object ownership for cross-account uploads
  • 404 vs 403: S3 returns 403 instead of 404 when you lack s3:ListBucket
  • **kms:Decrypt AccessDenied**: key policy and IAM must both allow cross-account use
  • Wrong identity: run aws sts get-caller-identity. Remember the role the service uses (task role vs execution role, Lambda execution role)
  • Decode Encoded authorization failure message with sts decode-authorization-message

Containers (ECS and EKS)

SymptomCheck
Task stops immediately: Essential container exitedContainer logs (awslogs), exit code, command, environment variables, memory limit (exit 137 = killed for memory)
CannotPullContainerErrorECR permissions on the task execution role, no route to ECR (NAT or VPC endpoints), wrong image tag
Service keeps replacing tasksFailing ALB health check (path, port, security group, grace period too short)
ResourceInitializationError for secretsExecution role cannot read the secret or network cannot reach Secrets Manager
Pod CrashLoopBackOff (EKS)kubectl logs, kubectl describe pod, resources, probes, IRSA role

Network

  • Timeout (no response) is usually network: security group, NACL, route table, missing NAT, wrong subnet, DNS
  • Connection refused means the host is reachable but nothing listens on that port
  • Use VPC Flow Logs (REJECT lines) and Reachability Analyzer to see where traffic stops
  • Security group chain: ALB SG to app SG to DB SG on the right ports
  • Resolve names with the VPC DNS (enable DNS hostnames/support for endpoints)

CloudFormation and Deployments

SymptomCause and fix
ROLLBACK_COMPLETE on createA resource failed. Read stack events for the first CREATE_FAILED. Delete the stack and redeploy
UPDATE_ROLLBACK_FAILEDResource changed manually or dependency issue. Fix and continue update rollback
Requires capabilities: [CAPABILITY_IAM]Add the capability flag
Resource name already existsRemove hard-coded names or delete the old resource
Export in useAnother stack imports it. Update or remove the importer first
CodeDeploy failed on ValidateServiceCheck hook script output in /opt/codedeploy-agent/deployment-root/.../logs/scripts.log
Beanstalk deployment failseb logs, .ebextensions errors, health, immutable rollback

Cost and Capacity Surprises

  • Bill spike: Cost Explorer by service and tag, look for NAT data transfer, CloudWatch Logs ingestion, Lambda loops (S3 trigger recursion), idle resources
  • Service quota errors (LimitExceededException): check Service Quotas and request an increase early

Exam-Style Scenarios

ScenarioAnswer
Lambda writes to DynamoDB but throttles during burstsUse on-demand mode or increase capacity, SDK retries with backoff, buffer with SQS
Users get intermittent 504 from API Gateway for long reportsReturn 202 and process asynchronously
Encrypted S3 reads fail for a new roleAdd kms:Decrypt on the key policy and role
ECS tasks cannot pull images in private subnetsAdd NAT or ECR and S3 VPC endpoints
Lambda in VPC cannot call DynamoDBAdd a DynamoDB gateway endpoint or NAT
Duplicate orders created when SQS redeliversIdempotent consumer with a conditional write
Need to know who changed a security groupCloudTrail event history

Practice Tasks

  1. Break a Lambda function's role on purpose and trace the error to the missing permission
  2. Reproduce an API Gateway 502 and fix the response format
  3. Force DynamoDB throttling and compare provisioned and on-demand behavior
  4. Find a REJECT in VPC Flow Logs for a blocked port
  5. Practise with the exam-style table: answer without looking, then check

Conclusion

Use a method: define the symptom, locate the layer, read metrics, logs and traces, check recent changes, test one hypothesis at a time. Know the signature of common failures: Lambda timeouts and throttles, API Gateway 502 vs 504, DynamoDB hot keys and 1 MB pages, SQS visibility problems, KMS and policy denials, ECS pull and health check issues, network timeouts, and CloudFormation rollbacks.

Quick Summary: method; Lambda; API Gateway; DynamoDB; messaging; permissions; containers; network; CloudFormation; cost; exam scenarios.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators