Explain it simpler
When something breaks, you need clues. Amazon CloudWatch collects three kinds. Metrics are numbers over time, like how many requests failed each minute; they tell you what is wrong and when it started. Logs are the detailed messages your code and AWS services write; they tell you why. Dashboards put the most important graphs on one screen so you can see everything at a glance. CloudWatch Logs Insights lets you search and summarize huge amounts of logs by typing short queries, like 'show me the 50 newest errors'. It is like a doctor: first check temperature and pulse (metrics), then ask detailed questions and run tests (logs) to find the cause.
At 2:10 p.m. at Bluewater Travel, the support lead pings the on-call channel: customers say checkout has been slow for about an hour, and a few bookings failed. Sam is on call. There are fourteen Lambda functions, an API Gateway REST API, an SQS queue and two DynamoDB tables behind that checkout button, and the log groups hold millions of lines. Scrolling through logs at random will not find anything before the next escalation. Sam needs to know when the slowdown started, which component is responsible and what the error actually says. Where should Sam look first, and how do the different CloudWatch tools narrow the search?
Root cause analysis means going from a symptom, such as 'checkout is slow', to a specific cause, such as 'the payment function times out calling a third-party API'. Amazon CloudWatch provides the raw material: logs, metrics, alarms and dashboards. Domain 4 of the Developer Associate exam, Troubleshooting and Optimization, often presents a symptom and asks which tool or data source to use, or what a particular metric or log line reveals. Knowing what each tool is good at is what makes an investigation fast.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 8 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.