SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Monitoring, Logging, Analysis, Remediation, and Performance Optimization

CloudWatch Metrics, Alarms, and Log Filters for SOA-C03

26 min readSOA-C03 · Monitoring, Logging, Analysis, Remediation, and Performance OptimizationUpdated

Amazon CloudWatch is the monitoring and logging backbone of AWS operations: it collects metrics, ingests logs, and raises alarms for every workload you run. Task 1.1 of the SOA-C03 exam tests whether you can wire that telemetry correctly — choose the right metric resolution, run the CloudWatch agent across EC2 fleets and container clusters, monitor serverless and AI workloads, turn log patterns into alarmable metrics, design alarms that act directly or through Amazon EventBridge, and make sure the Amazon SNS notification actually arrives. It also expects you to keep CloudWatch and AWS CloudTrail straight — performance telemetry versus an audit trail of API calls — and to build dashboards that span accounts and Regions. This lesson covers all five skills in the task, including the failure modes questions are built on: missing memory metrics, alarms stuck in INSUFFICIENT_DATA, alarm actions that silently fail, and notifications that never arrive.

What you’ll learn

  • Distinguish standard, detailed, and high-resolution metrics, and pair high-resolution metrics with 10- or 30-second alarms
  • Install, configure, and permission the CloudWatch agent across an EC2 fleet with Systems Manager and Parameter Store
  • Choose the right collector for containers: Container Insights on ECS (Fargate and EC2) and EKS, or Amazon Managed Service for Prometheus
  • Monitor serverless and AI workloads with built-in Lambda metrics, Lambda Insights, and Amazon Bedrock metrics and invocation logging
  • Create metric filters, subscription filters (including cross-account), Logs Insights queries, and Live Tail sessions for the right job
  • Design alarms with evaluation periods, datapoints-to-alarm, missing-data handling, and composite logic
  • Know which actions metric and composite alarms invoke directly and which need EventBridge, and fix the permissions each one needs
  • Wire SNS notifications that survive encryption and service-publisher policies, and share dashboards across accounts, Regions, and people
  • Separate CloudTrail's API-audit role from CloudWatch's performance telemetry, including event history, trails, and Insights events

The 11 parts · about 19 min of reading

  1. CloudWatch metricsStart hereA metric is a namespace, name and dimension set; any mismatch means no data, and resolution decides how fast alarms can react.2 min
  2. What EC2 doesn't tell youMemory, disk space and processes need the CloudWatch agent, ideally configured fleet-wide from Parameter Store with the right role policy.2 min
  3. Containers: Container Insights on ECS and EKS, and Managed PrometheusHow Container Insights is switched on for ECS on Fargate, ECS on EC2 and EKS, and when Managed Prometheus fits instead.2 min
  4. Serverless and AI workloadsWhich built-in Lambda and Bedrock metrics answer which question, and what Lambda Insights and invocation logging add.2 min
  5. CloudWatch LogsRetention and log class are set per log group, and Logs Insights queries history while Live Tail watches events as they arrive.2 min
  6. Metric filtersA metric filter counts log matches into an alarmable metric, while a subscription filter streams the events, even across accounts.2 min
  7. CloudTrail for operatorsCloudTrail answers who called which API: 90 days of event history by default, a trail for longer, and metric filters to alert on it.2 min
  8. Alarm anatomyAlarm states, the period and M out of N settings, and the four treat-missing-data options that decide what a gap means.1 min
  9. Alarm actions and composite alarmsWhich actions an alarm runs natively, which need EventBridge, the Lambda permission, and composite alarms that cut paging noise.2 min
  10. SNS wiringThree links must hold for a notification to arrive: a live subscription, a topic policy for the publisher, and a usable KMS key.1 min
  11. Dashboards across accounts and RegionsPer-widget Regions, cross-account observability with Regional sinks and links, and the four ways to share a dashboard.1 min

Mind map

Namespace + name + dimensions = onemetricDetailed monitoring: 1-minute, no newmetricsStorageResolution 1 enables 10 or 30 salarmsMetric streams export via Firehose1✓Metrics, dimensions,resolutionMemory, disk space, swap need theagentprocstat alarms on a dead daemonConfig in Parameter StoreAmazonCloudWatch-*Role needs CloudWatchAgentServerPolicy2✓The CloudWatch agentFargate: containerInsights clustersettingAccount setting only applies to newclustersEKS: CloudWatch Observability add-onPrometheus tooling: Managed Prometheus3✓Container InsightsThrottles never run code or logLambda Insights adds memory and CPUAlarm on Bedrock token countsInvocation logging keeps prompts; offby default4✓Lambda and BedrockRetention defaults to never expireExport to S3 before retention expiresitLog class fixed at creationLogs Insights: history; Live Tail:real time5✓Log groups and queriesFilters never backfill old eventsAlarm on Sum, default value 0Subscription filters stream the eventsCross-account: Logs destination +policy6✓Metric and subscriptionfiltersEvent history: 90 days per RegionTrail to S3 for multi-year retentionData events only on a trailFailed sign-ins: Logs + metric filter+ alarm7✓CloudTrail for operatorsOK, ALARM, INSUFFICIENT_DATAM out of N need not be consecutivenotBreaching for sparse error countsDisabled actions: still evaluates8✓Alarm anatomyNative: SNS, Lambda, EC2, Auto ScalingRunbooks go through EventBridgeLambda policy:lambda.alarms.cloudwatchComposite: no EC2 or Auto Scalingactions9✓Actions and compositealarmsPending email subscription getsnothingTopic in the same Region as the alarmTopic policy must allowevents.amazonaws.comaws/sns key blocks alarm notifications10✓SNS wiringEach widget picks its own RegionCross-account observability: sink +linksSinks and links are RegionalEmail sharing: up to five named people11✓Dashboards acrossaccountsCloudWatchmonitoring forSOA-C03
Mind map

CloudWatch Metrics, Alarms, and Log Filters for SOA-C03

Namespace + name + dimensions = onemetricDetailed monitoring: 1-minute, no newmetricsStorageResolution 1 enables 10 or 30 salarmsMetric streams export via Firehose1✓Metrics, dimensions,resolutionMemory, disk space, swap need theagentprocstat alarms on a dead daemonConfig in Parameter StoreAmazonCloudWatch-*Role needs CloudWatchAgentServerPolicy2✓The CloudWatch agentFargate: containerInsights clustersettingAccount setting only applies to newclustersEKS: CloudWatch Observability add-onPrometheus tooling: Managed Prometheus3✓Container InsightsThrottles never run code or logLambda Insights adds memory and CPUAlarm on Bedrock token countsInvocation logging keeps prompts; offby default4✓Lambda and BedrockRetention defaults to never expireExport to S3 before retention expiresitLog class fixed at creationLogs Insights: history; Live Tail:real time5✓Log groups and queriesFilters never backfill old eventsAlarm on Sum, default value 0Subscription filters stream the eventsCross-account: Logs destination +policy6✓Metric and subscriptionfiltersEvent history: 90 days per RegionTrail to S3 for multi-year retentionData events only on a trailFailed sign-ins: Logs + metric filter+ alarm7✓CloudTrail for operatorsOK, ALARM, INSUFFICIENT_DATAM out of N need not be consecutivenotBreaching for sparse error countsDisabled actions: still evaluates8✓Alarm anatomyNative: SNS, Lambda, EC2, Auto ScalingRunbooks go through EventBridgeLambda policy:lambda.alarms.cloudwatchComposite: no EC2 or Auto Scalingactions9✓Actions and compositealarmsPending email subscription getsnothingTopic in the same Region as the alarmTopic policy must allowevents.amazonaws.comaws/sns key blocks alarm notifications10✓SNS wiringEach widget picks its own RegionCross-account observability: sink +linksSinks and links are RegionalEmail sharing: up to five named people11✓Dashboards acrossaccountsCloudWatchmonitoring forSOA-C03

How the exam tests this

Scenarios hinge on one detail. "Memory or disk-space metrics are missing" points to the CloudWatch agent; a whole fleet with one place to change the configuration points to Parameter Store plus the Systems Manager agent documents, and agent publishing errors point to a missing CloudWatchAgentServerPolicy. Container questions turn on the platform: Fargate needs only the cluster setting, existing ECS clusters are not changed by the account setting, EKS uses the CloudWatch Observability add-on. Serverless and AI items separate Lambda Throttles from Errors and ConcurrentExecutions, Lambda Insights from built-in metrics, and Bedrock metrics from model invocation logging. Log items separate metric filters (alarm on Sum, default value 0, no backfill), subscription filters (including cross-account destinations), Logs Insights (history) and Live Tail (now). Alarm items probe M-out-of-N, treat-missing-data, which actions metric and composite alarms take directly versus through EventBridge, and the permissions that make an action or notification actually work — the Lambda resource policy, SNS topic policies, and a customer managed key on encrypted topics. Audit items test CloudTrail event history versus trails, and dashboard items test Regional cross-account links and the sharing options.

Key takeaways

  1. Default EC2 metrics never include memory or disk-space utilization — collecting those (and process counts via procstat) requires the CloudWatch agent.
  2. Run the agent at fleet scale with one Parameter Store configuration (AmazonCloudWatch-*), AWS-ConfigureAWSPackage to install, and AmazonCloudWatch-ManageAgent to apply; instances need CloudWatchAgentServerPolicy.
  3. Container Insights: the cluster setting on ECS (Fargate needs nothing else; the ECS account setting only defaults new clusters), the CloudWatch Observability add-on on EKS; it does not ship application logs.
  4. Lambda Throttles are rejected requests that never ran; Lambda Insights adds memory and CPU; Bedrock token metrics feed alarms, while prompts and responses need model invocation logging (off by default).
  5. Only a high-resolution metric (StorageResolution 1) can back a 10- or 30-second alarm; detailed monitoring adds frequency, not new metrics.
  6. Metric filters count new log events only — alarm on their Sum, with a default value of 0; subscription filters stream events, cross-account through a Logs destination.
  7. Logs Insights queries history; Live Tail watches events as they arrive; log class is fixed at creation; long-term retention means exporting to S3.
  8. M-out-of-N need not be consecutive; treat missing data "ignore" freezes the current state; disabling actions does not stop evaluation.
  9. Metric alarms act directly via SNS, Lambda, EC2 actions, Auto Scaling, OpsItems (and, for existing Incident Manager users, incidents) and investigations; composites cannot take EC2 or Auto Scaling actions; runbooks go through EventBridge.
  10. Lambda alarm actions need the function policy to allow lambda.alarms.cloudwatch.amazonaws.com; encrypted SNS topics need a customer managed key that allows the publishing service.
  11. CloudTrail event history keeps 90 days of management events per Region and cannot be extended; longer retention needs a trail to S3.
  12. Cross-account observability links are Regional; dashboard email sharing covers one dashboard for up to five people, SSO sharing covers all dashboards.
0/11
Ready to start

Part 1: CloudWatch metrics

A metric is a namespace, name and dimension set; any mismatch means no data, and resolution decides how fast alarms can react.

2 min read · 11 parts, about 19 min in allStart lesson

Frequently asked questions

Why doesn't CloudWatch show memory utilization for my EC2 instance?

Because the default EC2 metrics come from the hypervisor, which cannot see inside the guest operating system. Memory utilization, disk-space utilization, and swap usage are OS-internal, so CloudWatch only receives them if you install and configure the CloudWatch agent on the instance. The agent reads a JSON configuration (best stored in Systems Manager Parameter Store for fleet-wide consistency) and needs the CloudWatchAgentServerPolicy on the instance role to publish.

What is the difference between standard and detailed monitoring in EC2?

Standard monitoring publishes EC2 instance metrics every 5 minutes at no charge. Detailed monitoring publishes the same metrics every 1 minute for an additional cost, letting alarms and Auto Scaling react faster. Detailed monitoring does not add any new metrics — it only increases frequency. It still will not give you memory or disk-space metrics; those need the CloudWatch agent.

What's the difference between a metric filter and a subscription filter in CloudWatch Logs?

A metric filter matches a pattern in a log group and publishes a CloudWatch metric — usually a value of 1 per match, alarmed on with the Sum statistic — so it produces a number. A subscription filter delivers the matching log events themselves, in near real time, to Kinesis Data Streams, Amazon Data Firehose, or a Lambda function, including to another account through a CloudWatch Logs destination. Use a metric filter to detect and alert; use a subscription filter to move or process the logs. Neither one processes events ingested before it was created.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?