Easy ReviewSAA-C03
Design Secure Architectures53

CloudWatch

Collect metrics and logs, detect failures with alarms, and investigate application and user experience.

CloudWatch brings together metric measurements, log events, alarms, and dashboards. Use the sections below to choose collection and delivery paths, understand alarm behavior, and investigate application health with logs, service objectives, and user experience checks.

CloudWatch basics

Amazon CloudWatch is the monitoring service of AWS: it collects metricsA metric is a sequence of measured values recorded over time. and logs from resources and applications and acts on them with alarms and dashboards.

How it works

  1. AWS services publish metrics such as CPU use to CloudWatch; the CloudWatch agent adds metrics and logs from inside instances.
  2. Dashboards show the data, and Logs stores and searches log lines.
  3. An alarm watches a metric against a threshold and triggers an action, such as an SNS notification or scaling.

Exam cues

  • If the question says monitor performance, set a threshold alert or view a dashboard, think CloudWatch.
  • If the question says collect logs from servers, think CloudWatch Logs with the CloudWatch agent.

Remember

  • Metrics, alarms, dashboards and logs.
  • The agent collects data from inside EC2 instances.

Trap: CloudWatch shows how resources behave. It does not record who called an API; CloudTrail does.

From the AWS docs (5)
  • Amazon CloudWatch monitors AWS resources and the applications running on AWS in real time.
  • CloudWatch provides metrics, alarms and dashboards for operational visibility, and collects, stores and queries logs.
  • The CloudWatch agent gathers metrics, logs and traces from Amazon EC2 instances.
  • A billing alarm watches the EstimatedCharges metric and notifies through Amazon SNS; billing alerts must be turned on first, and billing metric data is stored in US East (N. Virginia).
  • Amazon CloudWatch monitors AWS resources and applications in real time, covering resource utilization, application performance and operational health.

Metrics, dimensions, and resolution

CloudWatch metricsA metric is a sequence of measured values recorded over time. store measurements over time, such as CPU use or request latencyLatency is the delay measured for an application operation., the delay a request experiences. For traditional metrics, the namespaceA metric namespace keeps related metrics together and separates them from other metric collections. is the container, the metric name is the measurement, and dimensionsA dimension is a name and value that identifies a particular variation of a metric. are name and value pairs identifying what was measured.

How it works

  1. Publish data under a namespace, metric name, and dimension combination. Changing a dimension creates a separate metric in that Region.
  2. Choose standard or high resolutionMetric resolution describes the time granularity at which metric data is stored. for a custom metric. With PutMetricData, set StorageResolution=1 for high resolution.
  3. Select a periodA period is the time span over which metric values are combined into a statistic., the time interval over which CloudWatch calculates a statisticA statistic summarizes the metric values collected during a period.. Use an average for the mean or a percentileA percentile describes the value below which a specified percentage of samples falls. to examine the distribution. The p95 value has 95 percent of samples below it.
  4. Graph or alarm on the statistic. CloudWatch combines older measurements into coarser periods before they expire.

Exam cues

  • If the question says EC2 CPU data must arrive each minute, think detailed monitoring, because basic CPU monitoring uses 5-minute periods.
  • If the question says a healthy average hides slow requests, think a high latency percentile, because it exposes the slower part of the distribution.
  • If the question says alert before a service quota is reached, think a CloudWatch alarm on usage divided by SERVICE_QUOTA, because metric math turns usage into a percentage of the quota.

Remember

Traditional metric data period Retention
Below 60 seconds 3 hours
1 minute 15 days
5 minutes 63 days
1 hour 455 days, or 15 months
  • Standard resolution: 60 seconds. High resolution: 1 second. Maximum dimensions: 30.
  • High-resolution alarm periods include 10, 20, and 30 seconds.
  • Basic EC2 status checks already use 1-minute periods. Detailed monitoring adds charges for other 1-minute metrics.

Trap: A shorter alarm period cannot make basic EC2 CPU metrics arrive more often. Change the monitoring configuration.

Trap: These namespace, dimension, and retention rules describe traditional CloudWatch metrics. OpenTelemetryOpenTelemetry is an open framework for collecting metrics, logs, and traces using instrumentation. metrics use labels and have different storage behavior.

From the AWS docs (20)
  • A traditional CloudWatch metric is a time series identified by its namespace, name, and dimension combination.
  • A namespace separates related metrics from metrics in other namespaces; AWS service namespaces commonly start with AWS/.
  • A dimension is a name and value that identifies a variation of a traditional CloudWatch metric.
  • A traditional CloudWatch metric supports up to 30 dimensions.
  • CloudWatch does not automatically aggregate traditional custom metrics across different dimension combinations.
  • Traditional CloudWatch metrics belong to the Region where they are created.
  • Traditional custom metrics have standard resolution of 60 seconds or high resolution of 1 second.
  • PutMetricData uses StorageResolution=1 to publish high-resolution custom metrics.
  • High-resolution alarms support periods of 10, 20, or 30 seconds and cost more than standard alarms.
  • Metric data with periods shorter than 60 seconds is available for 3 hours.
  • Metric data at a 1-minute period is available for 15 days.
  • Metric data at a 5-minute period is available for 63 days.
  • Metric data at a 1-hour period is available for 455 days, or 15 months.
  • CloudWatch aggregates older metric data into coarser periods before its eventual expiration.
  • EC2 basic monitoring is the default and has no charge; status checks have 1-minute periods and other metrics have 5-minute periods.
  • EC2 detailed monitoring provides 1-minute metrics with additional per-metric charges.
  • The p95 statistic is the value below which 95 percent of samples fall; percentiles describe a distribution rather than its average.
  • A high latency percentile exposes the experience of slower requests that an average can hide.
  • CloudWatch OpenTelemetry metrics use labels rather than traditional dimensions and follow different resolution and retention behavior.
  • For services that publish usage metrics to Service Quotas, the metric math expression m1/SERVICE_QUOTA(m1)*100 shows usage as a percentage of the quota, and a CloudWatch alarm on it can notify before the quota is reached.

Agent and custom metrics

The CloudWatch agent collects measurements and log files from inside a server. It fills the gap between EC2 host monitoring and what the operating system or application knows, such as memory use and free disk space.

How it works

  1. Grant the server permission to publish telemetryTelemetry is operational data such as measurements, log events, and request traces., meaning operational measurements and events.
  2. Install the agent and configure which guest metricsA metric is a sequence of measured values recorded over time. and file paths to collect. Start the agent to send the data.
  3. Use Systems Manager for fleet management and Parameter Store to hold the configuration.
  4. For application metrics carried in logs, emit embedded metric formatEmbedded metric format places custom metric definitions and values inside structured log events. (EMF), structured log data containing metric definitions. CloudWatch extracts those metrics asynchronously without a separate PutMetricData call.

Exam cues

  • If the question says EC2 memory and disk space are missing, think CloudWatch agent, because it collects guest measurements.
  • If the question says Lambda should emit metrics without PutMetricData, think EMF, because extraction happens from log eventsA log event records an activity as a timestamp and a message..
  • If the question says configure many agents consistently, think Systems Manager and Parameter Store, because they manage installation and shared configuration.

Remember

  • Traditional agent metrics use CWAgent by default and incur custom metric charges.
  • EMF publishing needs logs:PutLogEvents, without cloudwatch:PutMetricData.
  • CardinalityMetric cardinality is the number of distinct combinations of identifying labels or dimensions. means the number of distinct dimensionA dimension is a name and value that identifies a particular variation of a metric. combinations. Each EMF combination creates a custom metric.
  • AWS recommends OpenTelemetryOpenTelemetry is an open framework for collecting metrics, logs, and traces using instrumentation. metrics for most new workloads; EMF keeps measurements with their originating log details.

Trap: A request ID is useful in a log but costly as an EMF dimension when every request creates another metric.

From the AWS docs (12)
  • The CloudWatch agent collects guest operating system metrics and log files from EC2 and on-premises servers.
  • Use the CloudWatch agent to collect guest memory and disk space metrics beyond EC2 basic monitoring.
  • Traditional CloudWatch metrics collected by the agent use CWAgent as the default namespace and are billed as custom metrics.
  • The agent setup consists of granting permissions, installing the package, configuring collection, and starting the agent.
  • Systems Manager can install and manage the CloudWatch agent; its configuration can be stored in Parameter Store.
  • CloudWatchAgentServerPolicy grants metric and log publishing permissions and GetParameter access to AmazonCloudWatch-* parameters.
  • Embedded metric format puts metric definitions and values inside structured logs so CloudWatch can extract custom metrics asynchronously.
  • Publishing embedded metric format log events requires logs:PutLogEvents without requiring cloudwatch:PutMetricData.
  • Each unique dimension combination in embedded metric format creates a custom metric, so request IDs as dimensions can increase charges.
  • AWS recommends OpenTelemetry metrics for most new workloads; embedded metric format suits workloads that need metrics kept with their originating log events.
  • On Linux, the CloudWatch agent can collect swap metrics such as swap_used, swap_free and swap_used_percent, which EC2 does not publish by itself.
  • CloudWatch Lambda Insights adds a Lambda extension layer that reports system metrics such as CPU, memory, disk and network, plus diagnostics such as cold starts.

Alarm evaluation and missing data

A CloudWatch metric alarmA metric alarm evaluates a metric over time and can trigger an action when its state changes. compares a measurement or expression with a threshold. Its periodA period is the time span over which metric values are combined into a statistic. defines each measurement interval; its evaluation settings decide how many breaches indicate a problem.

How it works

  1. Choose the metricA metric is a sequence of measured values recorded over time. or expression, statisticA statistic summarizes the metric values collected during a period., threshold, and period.
  2. Set Evaluation Periods to N and Datapoints to Alarm to M. The alarm counts M breaches within N periods; breaches need not be consecutive.
  3. With the default sliding window, CloudWatch looks farther back for real points before filling missing dataMissing data means an expected metric data point was not received for an evaluation period.. The missing-data setting matters only when it cannot obtain enough real points.
  4. Evaluate as OK, ALARM, or INSUFFICIENT_DATA, meaning healthy, breaching, or unable to decide from the available data.
Missing-data setting Meaning when gaps must be filled
missing Default; an entirely absent evaluation range gives INSUFFICIENT_DATA
notBreaching Treat gaps as healthy
breaching Treat gaps as a problem
ignore Keep the current state

Exam cues

  • If the question says a metric emits only on application errors, think notBreaching, because silence does not indicate errors.
  • If the question says a heartbeat must always report, think breaching, because silence can indicate failure.
  • If the question says stop or recover EC2 automatically, think missing with actions only in ALARM, because metric interruptions can occur while the instance is healthy.

Remember

  • Three out of five means any 3 breaches among 5 available periods, not necessarily consecutive.
  • Periods of at least 1 minute normally evaluate each minute.
  • Evaluation intervals longer than 1 day evaluate hourly.

Trap: Selecting breaching does not force every absent recent point to count as bad. The default sliding window first uses real points from its wider evaluation range.

From the AWS docs (12)
  • A metric alarm has OK, ALARM, and INSUFFICIENT_DATA states.
  • Evaluation Periods specifies N recent periods and Datapoints to Alarm specifies M breaches; breaching points need not be consecutive.
  • Alarms with periods of at least 1 minute evaluate every minute unless their total evaluation interval exceeds 1 day.
  • An alarm whose period multiplied by evaluation periods exceeds 1 day evaluates hourly.
  • The default missing-data option is missing; an entirely missing evaluation range yields INSUFFICIENT_DATA.
  • notBreaching treats missing data as within the threshold.
  • breaching treats missing data as violating the threshold.
  • ignore retains the current alarm state when missing-data handling is required.
  • With the default sliding window, CloudWatch retrieves extra data and uses the missing-data setting only when too few real points are available.
  • For a metric that reports only errors, notBreaching prevents absent error data from being treated as a fault.
  • For a continually reporting application health metric, breaching can make missing telemetry indicate a problem.
  • AWS recommends missing and actions only in ALARM for EC2 alarms that stop, terminate, reboot, or recover instances.

Alarm actions and composite alarms

CloudWatch alarm actions turn a detected condition into a notification or response. A composite alarmA composite alarm evaluates a logical rule over the states of other alarms. combines other alarms so related symptoms can produce a single notification.

How it works

  1. Create metric alarmsA metric alarm evaluates a metric over time and can trigger an action when its state changes. for the measurements that indicate trouble. Attach direct responses where needed.
  2. Create a composite rule such as ALARM("cpu") AND ALARM("errors"). It reads child alarm states, not metricA metric is a sequence of measured values recorded over time. values.
  3. Notify from the composite when the combined condition holds. Use SNS, a message delivery service, or another supported action.
  4. Keep EC2 and Auto Scaling actions on metric alarms. EventBridge rules can also route alarm state-change events to automation.
Action Metric alarm Composite alarm
SNS notification or Lambda function Supported Supported
Systems Manager action Supported Supported
EC2 stop, terminate, reboot, or recover Supported Not supported
Auto Scaling action Supported Not supported

Exam cues

  • If the question says several related alarms cause duplicate paging, think a composite condition, because it combines child states before notifying.
  • If the question says one combined alert and EC2 recovery, think separate composite and metric actions, because a composite cannot recover EC2.
  • If the question says the EC2 host has a system status failure, think recovery with StatusCheckFailed_System, because recovery addresses underlying host impairment.
  • If the question says alert when estimated charges pass a threshold, think a CloudWatch billing alarm in US East (N. Virginia) or AWS Budgets, because both alert on spend.

Remember

  • Composite rules use AND, OR, NOT and state tests ALARM, OK, INSUFFICIENT_DATA.
  • Reboot suits an instance status failure; recovery suits a system status failure.
  • Cross-account composite alarm creation is unsupported.

Trap: A composite alarm that invokes Lambda does not gain a native EC2 recovery action. Put the native recovery action on the metric alarm.

From the AWS docs (10)
  • Metric alarms can trigger SNS notifications, Lambda functions, EC2 actions, Auto Scaling actions, and supported Systems Manager actions.
  • A composite alarm evaluates states of other alarms rather than metric values.
  • Composite rules use ALARM, OK, and INSUFFICIENT_DATA tests with AND, OR, NOT, and parentheses.
  • Composite alarms support SNS, Lambda, Systems Manager actions, and CloudWatch investigations.
  • Composite alarms cannot perform EC2 or Auto Scaling actions.
  • Creating cross-account composite alarms is not supported.
  • EC2 alarm actions include stop, terminate, reboot, and recover.
  • For EC2 system status failures, use a recovery alarm on StatusCheckFailed_System; StatusCheckFailed_Instance is not a recovery trigger.
  • A reboot action suits instance status check failures and restarts the operating system on the same host.
  • CloudWatch sends alarm state-change events to EventBridge, where rules can route them to targets.

Log groups and retention

CloudWatch Logs stores timestamped events from applications and infrastructure. A log streamA log stream is a sequence of log events from the same source. holds events from one source; a log groupA log group collects streams that share retention, monitoring, and access settings. collects streams that need the same retention, monitoring, and access settings.

How it works

  1. Create a log group for streams with a shared storage and access policy. Each producer writes its events to a stream.
  2. Choose how long to retain events. Without configured retention or an overriding account policy, storage does not expire.
  3. For a common account rule, apply an account-level retention policy. RETROACTIVE includes matching existing groups; NEW_ONLY applies to groups created after the policy.

Exam cues

  • If the question says many application instances need common retention, think streams in a shared group, because retention belongs to the group.
  • If the question says existing groups must inherit a common account retention policy, think RETROACTIVE, because NEW_ONLY covers future groups.
  • If the question says protect a log group from accidental deletion, think deletion protection, because deletion remains blocked until protection is disabled.
  • If the question says cheaper ingestion for rarely queried logs, think the Essentials log class (formerly Infrequent Access), chosen when the log group is created. Choose Standard when Live Tail or subscription filtersA subscription filter selects incoming log events and sends matches to a processing destination. are required.

Remember

  • Default retention: indefinite. Streams per group: no limit.
  • An applicable account-level policy overrides the group’s own retention setting.
  • Among overlapping account policies, the longest retention wins; NEVER_EXPIRE is longest.
  • Deletion protection is off by default. It protects the log group; event retention remains a separate setting.
  • Private subnets reach CloudWatch Logs through an interface VPC endpointAn endpoint is the URL a canary requests when it calls an API..

Trap: A longer group retention value does not defeat a shorter applicable account policy. The account policy overrides the group value.

From the AWS docs (11)
  • A CloudWatch log event contains a timestamp and message describing an activity.
  • A log stream is a sequence of events from the same source.
  • A log group contains streams with shared retention, monitoring, and access controls.
  • A log group has no limit on its number of log streams.
  • CloudWatch Logs stores data indefinitely by default unless retention is configured or an applicable account policy overrides it.
  • An applicable account-level retention policy overrides a log group retention setting.
  • Account-level retention supports RETROACTIVE for matching existing and future groups or NEW_ONLY for groups created after the policy.
  • When account-level retention policies overlap, the longest retention applies; NEVER_EXPIRE is treated as the longest.
  • CloudWatch Logs deletion protection is off by default and prevents deletion of the log group until protection is disabled.
  • CloudWatch Logs Standard provides the full feature set; Essentials (formerly Infrequent Access, noted November 2026) lowers ingestion cost but excludes Live Tail and subscription filters. Storage and Logs Insights query prices are the same, and a log group's class is fixed at creation.
  • An interface VPC endpoint powered by AWS PrivateLink lets resources in a VPC send logs to CloudWatch Logs over private IP addresses.

Metric filters and patterns

A CloudWatch Logs metric filterA metric filter turns matching incoming log events into numeric metric values. converts matching incoming log eventsA log event records an activity as a timestamp and a message. into numbers that an alarm can monitor. Think of it as a counter on arriving events, rather than a search over stored history.

How it works

  1. Collect application logs in a Standard log class group. Choose a filter patternA filter pattern is an expression that identifies matching log events., which is an expression describing which events match.
  2. Set the metric namespaceA metric namespace keeps related metrics together and separates them from other metric collections., name, and value. A value of 1 counts each matching event. For JSON, structured data with named fields, { $.status = 500 } matches a numeric status field.
  3. Default 0 covers a minute with ingested logs but no matches. No ingestion still means no datapoint.
  4. Create a metric alarmA metric alarm evaluates a metric over time and can trigger an action when its state changes. on the generated metricA metric is a sequence of measured values recorded over time.. Use Logs Insights separately to investigate stored history.

Exam cues

  • If the question says alert on new application error messages, think metric filter followed by metric alarm, because the filter converts log matches into measurements.
  • If the question says JSON logs have numeric status 500, think { $.status = 500 }, because it matches that field value.
  • If the question says count errors already stored before filter creation, think Logs Insights, because metric filters do not backfill.

Remember

  • Standard log class only. New events only.
  • Value 1 counts matches. Default 0 requires incoming logs during that minute.
  • Filter patterns and Logs Insights queries have different syntax.

Trap: Default zero does not prove that logging is alive. A silent producer generates no datapoint.

From application logs to an alarm
123Log groupMetric filterCustom metricMetric alarm
  1. New events reach the metric filter.

  2. Matching events publish metric values.

  3. The metric alarm evaluates the generated metric.

From the AWS docs (11)
  • A CloudWatch Logs metric filter turns matching ingested log events into numerical CloudWatch metric data.
  • Metric filters are supported only on Standard log class groups.
  • Metric filters publish data only for events after filter creation; they do not backfill stored events.
  • A metric filter specifies a pattern, metric namespace, metric name, and metric value.
  • A metric value of 1 counts occurrences of matching events.
  • A default value of 0 reports zero when logs arrive in a minute but none match.
  • A metric filter emits no value for a minute in which no logs are ingested, even if its default value is 0.
  • A JSON filter can compare a numeric field with a value, such as { $.status = 500 }.
  • Filter patterns support matching terms in text, JSON, and space-delimited logs; Logs Insights has a separate query language.
  • The CloudWatch metric produced by a log filter can be graphed or used by a metric alarm.
  • JSON and space-delimited metric filters can publish up to three dimensions; dimension values are charged like custom metrics, so avoid high-cardinality fields such as IP addresses or request IDs.

Logs Insights

CloudWatch Logs Insights searches stored log eventsA log event records an activity as a timestamp and a message. to answer questions about past behavior. Use it when the evidence is already in the logs and a newly created metric filterA metric filter turns matching incoming log events into numeric metric values. would start too late.

How it works

  1. Choose the log groupsA log group collects streams that share retention, monitoring, and access settings. and time range for the investigation.
  2. Select a query language to specify how to select and combine records.
  3. With Logs Insights QL, use fields to select fields, filter to restrict events, stats to calculate aggregates, and sort to order results. Pipes pass results between commands.
  4. Use automatically discovered fields in supported logs and JSON. Field indexes, lookup structures for selected fields, can reduce how much data a query scans.
  5. Inspect results or add a query to a dashboard for repeated viewing.
  6. Use a scheduled query to run log analysis regularly and deliver results to a destination such as Amazon S3.
  7. For unexpected log patterns, use log anomaly detection. A detector monitors continuously; a Logs Insights anomaly detection query analyzes logs on demand.

Exam cues

  • If the question says count errors already logged last week, think Logs Insights, because it queries stored events.
  • If the question says investigate request details and aggregate failures, think query filtering and statisticsA statistic summarizes the metric values collected during a period., because they operate on the selected log records.
  • If the question says reduce repeated query scan volume, think field indexes and a focused time range, because charges depend on data scanned.
  • If the question says run a log query regularly and save its results to S3, think scheduled queries, because they automate execution and delivery.

Remember

  • Field indexes can reduce query scan volume.

Trap: A metric filter does not count yesterday’s stored events when created today. Use a historical query.

From the AWS docs (11)
  • CloudWatch Logs Insights interactively searches and analyzes stored CloudWatch log events.
  • Logs Insights automatically discovers fields in supported AWS service logs and JSON application logs.
  • Logs Insights charges depend on data scanned regardless of query language.
  • Field indexes can reduce scan volume and improve query performance.
  • Logs Insights QL pipes commands such as fields, filter, stats, and sort to select, restrict, aggregate, and order events.
  • Logs Insights query results can be added to a CloudWatch dashboard.
  • CloudWatch scheduled queries run log queries on a schedule and can deliver results to Amazon S3.
  • A newly created metric filter does not process historical events.
  • CloudWatch Contributor Insights rules analyze structured log events and rank the top contributors by a field, such as the instance or IP that sends the most errors.
  • Metric math's INSIGHT_RULE_METRIC function turns a Contributor Insights rule into a metric, so an alarm can fire, for example, when the top contributor's share of the total is too high.
  • CloudWatch Logs can learn normal log patterns and flag deviations with a continuous log anomaly detector or an on-demand Logs Insights anomaly detection query.

Synthetics and release diagnostics

CloudWatch Synthetics runs canaries, scripts that exercise endpointsAn endpoint is the URL a canary requests when it calls an API., the addresses applications call, or user actions without waiting for customers. A canaryA canary is a script that exercises an endpoint or user flow without requiring customer traffic. acts as a scheduled test user and leaves measurements and run evidence for diagnosis.

How it works

  1. Write a script or choose a blueprintA canary blueprint is a starting script for a common synthetic check., a starting script for a common check. Canaries use NodeA worker node is a machine that runs Kubernetes application workloads..js, Python, or Java and run through Lambda functions created in your account. Java runtimes do not include browser support.
  2. Run the canary once or schedule it using cron, a calendar-style schedule expression, or rate, a repeated interval. Checks can run as often as once per minute.
  3. Read SuccessPercent and Duration in the CloudWatchSynthetics namespaceA metric namespace keeps related metrics together and separates them from other metric collections.. The former measures successful runs without failures; the latter measures run time in milliseconds.
  4. Investigate a failed run using steps, screenshots, logs, and HTTP ArchiveAn HTTP Archive file records details about web requests and their performance. (HAR) files, which record web-request performance details. Logs are stored in S3 and CloudWatch Logs; screenshots, HAR files, and reports go to S3. Compare failed-run evidence with a successful run when diagnosing a release problem.
Blueprint What it checks
Heartbeat Loads a URL and stores a screenshot, HAR file, and URL logs
API canary Exercises an application programming interface (API), the interface other programs call, including multiple calls
Broken linkAn observability link is a source account resource that connects it to a monitoring account sink. checker Follows links up to the configured count, including the starting URL
Visual monitoring Compares screenshots with a baseline and fails beyond a configured difference threshold

Exam cues

  • If the question says prove checkout works without customer traffic, think Synthetics, because a canary generates the user actions.
  • If the question says pages still respond but links are broken, think broken link checker, because it follows links and records their failures.
  • If the question says detect unexpected visual changes after a release, think visual monitoring, because screenshots are compared with a baseline.
  • If the question says a release broke one checkout step, think failed-run details and a successful-run comparison, because the artifacts show the failing action and requests.

Remember

  • Maximum schedule frequency: once per minute.
  • Canary metricsA metric is a sequence of measured values recorded over time. use CloudWatchSynthetics; Duration is in milliseconds.
  • Visual monitoring needs a supported Puppeteer runtime; Python/Selenium and Playwright runtimes do not support that blueprint.
  • Broken-link limits include the initial URL.

Trap: A successful HTTP response does not prove the page looks right. A visual comparison can detect a layout change while requests still succeed.

A canary exercises an endpoint and records its run
exercise1publish metrics2store evidence3CanaryLambda executionEndpointscripted requestsCloudWatchsuccess + durationS3 artifactsscreenshots + reports
  1. The canary runs its script against the endpoint independently of customer traffic.

  2. The canary publishes SuccessPercent and Duration to CloudWatch.

  3. S3 stores screenshots, HAR files, and reports for diagnosis.

From the AWS docs (24)
  • Synthetics canaries run scripted endpoint and user-flow checks without requiring customer traffic.
  • Canary scripts use Node.js, Python, or Java and create Lambda functions in the account.
  • Canaries can run once or on a schedule as often as once per minute using cron or rate expressions.
  • Java canary runtimes do not include browser support or browser frameworks.
  • Canaries publish metrics in the CloudWatchSynthetics namespace.
  • SuccessPercent measures the percentage of canary runs that succeed without failures.
  • Duration measures canary run duration in milliseconds.
  • Canary run logs are stored in S3 and CloudWatch Logs; the details page exposes steps, screenshots, logs, and HAR files where available.
  • Synthetics stores screenshots, HAR files, and reports in the configured S3 bucket.
  • A HAR file is an HTTP Archive recording web-request performance details.
  • The heartbeat blueprint loads a URL and stores a screenshot, a HAR file, and logs of accessed URLs.
  • API canaries test API functionality and can perform multiple calls.
  • The broken link checker follows page links up to the configured count, including the starting URL in that count.
  • Visual monitoring compares screenshots against a baseline and fails when the difference exceeds the configured percentage threshold.
  • The visual monitoring blueprint requires a supported Puppeteer runtime and does not support Python/Selenium or Playwright runtimes.
  • For a failed canary, inspect SuccessPercent, failed-run steps, screenshots, HAR files, and logs and compare them with a successful run.
  • CloudWatch RUM collects performance information from actual user sessions.
  • A canary is a script that exercises an endpoint or user flow without requiring customer traffic.
  • A canary blueprint is a starting script for a common synthetic check.
  • Canary rate expressions specify a repeated interval; cron expressions specify scheduled times.
  • An endpoint is the URL a canary requests when it calls an API.
  • An application programming interface (API) is an interface that other programs call to use application functionality.
  • CloudWatch Network Synthetic Monitor measures packet loss and latency between a VPC subnet and on-premises IP addresses over hybrid links, with no agents to install.
  • CloudWatch Application Insights scans an application resources, sets up recommended metrics and logs for its components, and flags common problems.

Application Signals and SLOs

Application Signals connects application health measurements with a map of service dependencies, the other services an application calls. A service level objectiveA service level objective sets the percentage of time or requests that should meet a performance threshold over an interval. (SLO) turns a performance expectation into a target that CloudWatch can track over time.

How it works

  1. Enable application instrumentationInstrumentation adds code that records application operations and sends monitoring data., code that records measurements and traces. A traceA trace records the work performed by application components to handle a request. records the work application components perform for a request. Supported languages are Java, Python, NodeA worker node is a machine that runs Kubernetes application workloads..js, and .NET. On EKS, use the CloudWatch Observability add-on. Console instrumentation can restart podsA pod is the smallest deployable Kubernetes unit and contains one or more containers., the running units of an application, immediately; Auto monitor without Auto restart waits for the next workload deployment.
  2. Read the standard metricsA metric is a sequence of measured values recorded over time. in the ApplicationSignals namespaceA metric namespace keeps related metrics together and separates them from other metric collections., a named metric collection. Latency measures delay in milliseconds; Error counts HTTP 4xx responses; Fault counts HTTP 5xx responses and OpenTelemetryOpenTelemetry is an open framework for collecting metrics, logs, and traces using instrumentation. span status errors, failures recorded by tracing instrumentation.
  3. Choose a service level indicatorA service level indicator is a performance measurement used to judge whether a service meets its target. (SLI), the measurement used to judge performance. Set its threshold, target percentage, and calendar or rolling intervalA rolling interval evaluates the recent time window as that window moves forward.. A calendar intervalA calendar interval follows fixed calendar boundaries when an objective is evaluated. follows calendar boundaries; a rolling interval moves forward with time.
  4. Select the evaluation type below. Track the error budgetAn error budget is the unhealthy time or requests a service can have while still meeting its objective., the remaining allowance for unhealthy time or requests, and use breach, warning, or burn-rate alarms. Burn rateBurn rate measures how quickly a service consumes its error budget relative to its objective. measures how fast that allowance is spent relative to the goal.
Evaluation What attainment measures
Period-based Healthy time periodsA period is the time span over which metric values are combined into a statistic. divided by all periods
Request-based Good requests divided by all requests

Exam cues

  • If the question says map service dependencies and find application latencyLatency is the delay measured for an application operation. or faults, think Application Signals, because it connects health measurements with service relationships.
  • If the question says a fraction of requests must meet a latency target, think request-based SLO, because requests determine attainment.
  • If the question says each time period must meet a target, think period-based SLO, because periods determine attainment.
  • If the question says alert before the error budget runs out, think burn-rate alarm, because burn rate measures budget consumption.

Remember

  • Dashboard availability is (1 - Faults/Total) * 100; total responses come from SampleCount(Latency).
  • HTTP 4xx responses are not service faults in the availability calculation.
  • Sustained burn rate above 1 consumes the allowance faster than the SLO permits.
  • A request-based error budget can change as the request mix changes.

Trap: A high client error count does not necessarily reduce Application Signals availability. Distinguish Error from Fault.

From the AWS docs (23)
  • Application Signals collects application metrics and traces and discovers a map of services and dependencies.
  • Application Signals supports Java, Python, Node.js, and .NET applications.
  • On EKS, the CloudWatch Observability add-on supports Application Signals instrumentation.
  • EKS console instrumentation can restart application pods immediately; without Auto restart, Auto monitor takes effect at the next workload deployment.
  • Application Signals publishes standard application metrics in the ApplicationSignals namespace.
  • The Latency metric measures request delay in milliseconds.
  • The Error metric counts HTTP 4xx client errors.
  • The Fault metric counts HTTP 5xx server faults and OpenTelemetry span status errors.
  • Application Signals dashboard availability is (1 - Faults/Total) * 100, with Total derived from SampleCount(Latency); HTTP 4xx responses are not service faults.
  • An SLO sets a target percentage for a service level indicator, a performance measurement, to meet a threshold over a calendar or rolling interval.
  • A period-based SLO measures good time periods divided by total time periods.
  • A request-based SLO measures good requests divided by total requests.
  • A period-based SLO error budget is the allowed unhealthy time while still meeting the goal.
  • A request-based SLO error budget is the allowed unhealthy requests while meeting the goal and varies with the ratio of good requests to total requests.
  • Burn rate measures error-budget consumption relative to the goal; a sustained rate above 1 consumes the budget faster than allowed.
  • SLOs can have breach, warning, and burn-rate CloudWatch alarms.
  • Instrumentation adds code that records application operations and sends monitoring data.
  • A trace records the work performed by application components to handle a request.
  • A service dependency is another service or resource an application calls to complete its work.
  • A metric namespace keeps related metrics together and separates them from other metric collections.
  • A pod is the smallest deployable Kubernetes unit and contains one or more containers.
  • A calendar interval follows fixed calendar boundaries when an objective is evaluated.
  • A rolling interval evaluates the recent time window as that window moves forward.

Flashcards

tap to flip
Answer

·

All 53 cards as a list

How can Amazon CloudWatch support data governance through logging?

It collects, stores and queries logs.

Which AWS service collects and searches application log files from EC2 instances?

Amazon CloudWatch Logs, with the CloudWatch agent installed on the instances.

Does Amazon CloudWatch tell you which user changed a security group?

No. That is AWS CloudTrail. CloudWatch watches metrics, logs and alarms about performance and health.

A company wants an email when its estimated AWS charges pass 500 USD, using CloudWatch. What does it set up, and in which Region?

A CloudWatch billing alarm on EstimatedCharges with an SNS notification, created in US East (N. Virginia) after turning on billing alerts.

Which AWS service monitors resource utilization, application performance and operational health of AWS resources?

Amazon CloudWatch.

What identifies a traditional CloudWatch metric, and what does a new dimension value do?

Namespace, metric name, and dimensions identify it. A new dimension combination creates a separate metric. The limit is 30 dimensions, and custom metrics are not automatically aggregated across combinations.

Which resolutions can traditional CloudWatch custom metrics use, and which sub-minute alarm periods are supported?

Standard resolution is 60 seconds; high resolution is 1 second with StorageResolution=1. High-resolution alarms support 10, 20, or 30 seconds at a higher charge.

How long does CloudWatch retain traditional metric data at each granularity?

Sub-minute: 3 hours. One minute: 15 days. Five minutes: 63 days. One hour: 455 days. Older data is aggregated before it finally expires.

An EC2 fleet uses basic monitoring, but its CloudWatch CPU alarm needs fresh data each minute. What should change?

Enable detailed monitoring. Basic CPU metrics use 5-minute periods; detailed monitoring provides 1-minute metrics for an additional charge. Status checks already use 1-minute periods with basic monitoring.

An application has an acceptable average latency in CloudWatch, but some users report slow requests. Which statistic should operators examine?

A high percentile such as p95. It shows the slower end of the latency distribution that an average can hide.

A team wants an SNS alert when an AWS service usage metric passes 80 percent of its service quota. How can CloudWatch do this?

Graph the usage metric, add the metric math expression m1/SERVICE_QUOTA(m1)*100, and create an alarm on it with a threshold of 80 that notifies the SNS topic.

An EC2 application needs memory use, disk space use, and application log files in CloudWatch. What should operators install?

The CloudWatch agent, with publishing permissions such as CloudWatchAgentServerPolicy on the instance role. Configure the guest metrics and file paths; traditional agent metrics use CWAgent by default.

A Lambda function must publish CloudWatch custom metrics from its logs without making PutMetricData calls. What fits?

Embedded metric format. CloudWatch extracts custom metrics asynchronously from the structured log events. Avoid request IDs as dimensions because each dimension combination creates a custom metric.

A team wants centrally managed CloudWatch agent configuration across many servers. Where can it store the configuration?

Systems Manager Parameter Store. Use Systems Manager to install and manage the agent, with permissions to read its configuration.

A Lambda team needs request IDs for investigations but wants to avoid a separate CloudWatch metric for each request. How should it use embedded metric format?

Keep request IDs as log details and use stable dimensions for metrics. Embedded metric format creates a metric for every distinct dimension combination.

EC2 instances fail for lack of swap space. How do you monitor available swap on each instance?

Install the CloudWatch agent and collect its swap metrics (for example swap_used_percent); EC2 does not report swap by default.

A team needs memory and CPU usage plus cold-start data for its Lambda functions in CloudWatch. What should it enable?

Lambda Insights, the CloudWatch extension delivered as a Lambda layer.

A CloudWatch metric alarm uses Datapoints to Alarm=3 and Evaluation Periods=5. With all data present, when does it enter ALARM?

When at least 3 of the 5 recent datapoints breach. They need not be consecutive. For periods of at least 1 minute, evaluation normally happens every minute; intervals longer than 1 day evaluate hourly.

What are the four CloudWatch alarm missing-data settings and the default?

missing is the default and gives INSUFFICIENT_DATA when all data is absent. notBreaching treats gaps as good; breaching treats them as bad; ignore retains the state. CloudWatch fills gaps only when it lacks enough real points.

A CloudWatch application error-count metric emits data only when errors occur. Which missing-data setting fits?

notBreaching, because no error data should not imply a fault. For a continually reporting heartbeat, breaching can be appropriate. For EC2 stop, terminate, reboot, or recover alarms, AWS recommends missing.

A CloudWatch application heartbeat must report continuously. How can an alarm detect loss of the heartbeat?

Treat missing data as breaching. This makes absent expected health telemetry count toward the alarm condition.

Several related CloudWatch alarms page the same team. Which alarm type can combine their conditions into one notification?

A composite alarm. Its rule tests the states of other alarms with operators such as AND, OR, and NOT, so the team can notify from the combined condition.

Can a CloudWatch composite alarm recover an EC2 instance or execute an Auto Scaling policy?

No. Use a metric alarm for EC2 or Auto Scaling actions. A composite can notify SNS, invoke Lambda, use supported Systems Manager actions, or start an investigation.

A team needs one notification from related CloudWatch alarms and automatic EC2 recovery. How should it configure actions?

Use a composite alarm for the combined notification and a metric alarm for EC2 recovery. Composite alarms cannot perform the recovery action.

What can react automatically to a CloudWatch alarm state change?

Configure alarm actions such as SNS, Lambda, EC2, Auto Scaling, or Systems Manager. An EventBridge rule can also route the state-change event. Use StatusCheckFailed_System for a system-failure recovery alarm.

An EC2 guest operating system fails its instance status check. Should a CloudWatch alarm use reboot or system recovery?

Reboot is the appropriate instance-check action. System recovery addresses underlying host failures monitored by StatusCheckFailed_System.

What is the difference between a CloudWatch Logs log stream and a log group?

A stream holds events from one source. A group holds streams with common retention, monitoring, and access settings. A group has no limit on its number of streams.

A fleet writes application logs to separate CloudWatch streams but requires the same retention and access settings. How should operators organize the streams?

Put the streams in one log group. Retention, monitoring, and access settings are shared at the group level.

A CloudWatch log group has long retention, but an applicable account-level policy specifies shorter retention. Which setting applies?

The account-level retention policy overrides the group setting. If several account policies overlap, the longest applicable account policy wins.

An organization wants an account-level CloudWatch retention policy to affect existing matching log groups. Which enforcement mode fits?

RETROACTIVE. NEW_ONLY applies only to log groups created after the policy.

A team wants to cut ingestion cost for logs it only keeps for occasional cross-account analysis. Which log class fits, and can an existing log group switch to it?

The Essentials log class (formerly Infrequent Access), which has a lower ingestion price and fewer features. A log group's class is fixed at creation, so it needs a new log group.

A CloudWatch Logs design needs Live Tail and subscription filters. Can it use the cheaper Essentials log class?

Use Standard. Essentials, formerly Infrequent Access, does not support Live Tail or subscription filters.

EC2 instances in private subnets with no internet access must send logs to Amazon CloudWatch Logs. What should the VPC add?

An interface VPC endpoint for CloudWatch Logs (AWS PrivateLink).

An application sends ERROR log events to CloudWatch Logs. How can the team alarm on the error count?

Create a metric filter on the Standard log group with a matching pattern and metric value 1, then alarm on that metric. Default 0 covers ingested logs with no matches, but not minutes without ingestion.

A team needs a CloudWatch alarm when newly ingested JSON logs contain numeric status 500. What filter pattern fits?

Use { $.status = 500 } in a metric filter, then alarm on the resulting metric. It starts counting after filter creation and does not backfill stored events.

A CloudWatch Logs metric filter has default value 0, but the application sends no logs for a minute. Does the filter publish zero?

No. A default applies when logs arrive but none match. A minute with no ingestion produces no value.

A metric filter should add a dimension for each request ID. Is this a good idea?

No. Metric filters allow up to three dimensions, and each distinct value is charged like a custom metric, so high-cardinality fields such as request IDs drive up cost.

A team wants the error count in CloudWatch logs from last week. Will a newly created metric filter count those stored events?

No. Query the stored events with Logs Insights. Metric filters start publishing only for events after filter creation.

CloudWatch Logs Insights investigations scan too much data. What can reduce the scan volume?

Create field indexes for frequently queried fields and limit the groups and time range being investigated. Indexes let Logs Insights skip irrelevant data.

A team needs a CloudWatch Logs Insights query to run regularly and save results in Amazon S3. What feature fits?

Use a scheduled query with an S3 destination.

A team must find which EC2 instance produces the most error log lines and alarm when one instance causes over half of them. What fits?

A CloudWatch Contributor Insights rule on the logs, plus an alarm on INSIGHT_RULE_METRIC comparing the top contributor with the total.

A team wants CloudWatch Logs to find unusual log patterns without writing a rule for each error. Which feature fits?

Log anomaly detection. Use a detector for continuous monitoring or a Logs Insights anomaly detection query for an investigation.

A team must detect a broken checkout flow before customers encounter it. Which CloudWatch feature should it use?

A Synthetics canary that scripts the checkout actions. Canaries run without customer traffic and publish SuccessPercent and Duration metrics in CloudWatchSynthetics.

A team must test a login page while there are no customer sessions. Should it use CloudWatch RUM or Synthetics?

Synthetics. Its canary runs a scripted check independently of customer traffic. RUM observes actual user sessions.

After a deployment, a CloudWatch Synthetics canary fails. What evidence can help diagnose the failure?

Inspect the failed steps, screenshots, HAR files, logs, and SuccessPercent, and compare them with a successful run.

A release changes a web layout unexpectedly while HTTP requests still succeed. Which CloudWatch Synthetics check detects this?

Visual monitoring using a supported Puppeteer runtime. It compares screenshots with a baseline and fails when the difference exceeds the configured percentage.

A CloudWatch Synthetics checkout canary fails after an application release. Which evidence helps isolate the failed operation?

Inspect the failed run steps, screenshots, HAR request details, and logs; compare them with a successful run. Logs are available in S3 and CloudWatch Logs.

A team needs to detect a broken API flow after deployment without waiting for customers. Which CloudWatch feature fits?

Use a Synthetics API canary to run scripted checks, including multiple API calls.

Which CloudWatch feature provides application latency, error and fault metrics, a service map, and SLOs?

Application Signals. It supports Java, Python, Node.js, and .NET; the CloudWatch Observability add-on supports EKS instrumentation.

A team needs visibility into application requests and the services they call. Which CloudWatch feature fits?

Application Signals collects application metrics and traces and discovers a map of services and dependencies.

A team needs to measure application request delay with CloudWatch Application Signals. Which metric should it use?

Use the Latency metric, which measures request delay in milliseconds.

A team needs to understand the work application components perform for a request. What can CloudWatch Application Signals collect?

Application Signals collects traces. A trace records the work components perform to handle a request.

A team wants CloudWatch Application Signals visibility for an Amazon EKS application. What supports its instrumentation?

The CloudWatch Observability add-on supports Application Signals instrumentation on EKS.

You finished every topic of SAA-C03!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified Solutions Architect - Associate (SAA-C03) on Easy Review. Come study too!