Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

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

3.2.3.6. Creating CloudWatch Custom Metrics and Metric Filters, Alarms, and Notifications (Amazon SNS, Lambda)

3.2.3.6. Installing & Configuring Agents (SSM Agent, CloudWatch Agent)

Agents extend AWS's management and monitoring capabilities onto your instances. Without them, you're limited to basic infrastructure metrics and no remote management.

SSM Agent:
  • Pre-installed on Amazon Linux 2, Ubuntu 16.04+, Windows Server 2016+
  • Enables: Run Command, Patch Manager, State Manager, Session Manager, Inventory
  • Requires: IAM instance profile with AmazonSSMManagedInstanceCore managed policy
  • Communication: HTTPS to SSM endpoints (needs internet access or VPC endpoints)
CloudWatch Agent:
  • Collects OS metrics (memory, disk, processes) and custom application logs
  • Install via SSM Distributor or manual download
  • Configuration stored in SSM Parameter Store for fleet-wide consistency
# Install CloudWatch Agent via SSM
aws ssm send-command \
  --document-name "AWS-ConfigureAWSPackage" \
  --targets "Key=tag:Role,Values=WebServer" \
  --parameters '{"action":["Install"],"name":["AmazonCloudWatchAgent"]}'

# Store agent config in Parameter Store
aws ssm put-parameter \
  --name "AmazonCloudWatch-linux-config" \
  --type String \
  --value file://cloudwatch-agent-config.json

# Apply config via SSM
aws ssm send-command \
  --document-name "AmazonCloudWatch-ManageAgent" \
  --targets "Key=tag:Role,Values=WebServer" \
  --parameters '{"action":["configure"],"optionalConfigurationSource":["ssm"],"optionalConfigurationLocation":["AmazonCloudWatch-linux-config"]}'

Unified CloudWatch Agent replaced the legacy CloudWatch Logs Agent and custom metrics scripts. It handles both metrics and logs in a single process.

Exam Trap: The CloudWatch Agent runs as root (Linux) or LocalSystem (Windows) and needs its own IAM permissions separate from the SSM Agent. The agent requires cloudwatch:PutMetricData for custom metrics and logs:PutLogEvents for log delivery. A common setup error is attaching only the SSM managed policy but not the CloudWatch Agent policy (CloudWatchAgentServerPolicy).

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned