Overview
PointFive identifies cost optimization opportunities by analyzing AWS resource utilization metrics. CloudWatch Agent provides the essential Memory usage data required for accurate opportunity detection and optimization recommendations.
High-Level Integration Flow
Why CloudWatch Agent is Required
Without CloudWatch Agent | With CloudWatch Agent |
Limited visibility into resource usage | Complete visibility into CPU utilization |
Cannot identify underutilized resources | Identifies inactive and underutilized instances |
Basic cost reporting only | Data-driven optimization recommendations |
Example Opportunities Enabled by CPU Metrics
Opportunity | Description |
Inactive EC2 Instance | Detects EC2 instances with consistently low CPU usage |
Underutilized EC2 Instance | Identifies EC2 instances with low CPU utilization that can be downsized |
CloudWatch Agent Cost Breakdown
This section details all AWS costs associated with CloudWatch Agent installation and operation. Bear in mind that you might be already using custom metrics, and therefore the cost implication will be different (or even zero)
CloudWatch Custom Metrics
Tiers | Cost (metric/month) |
First 10,000 metrics | $0.30 |
Next 240,000 metrics | $0.10 |
Next 750,000 metrics | $0.05 |
Over 1,000,000 metrics | $0.02 |
Memory-only configuration cost per instance: 1 metric × $0.30 = $0.30/instance/month
Example fleet costs (memory-only):
Fleet Size | Monthly Cost |
10 instances | $3.00 |
50 instances | $15.00 |
100 instances | $30.00 |
500 instances | $150.00 |
1,000 instances | $300.00 |
SSM Parameter Store
Tier | Storage | API Calls | Notes |
Standard (Free) | 10,000 parameters | 10,000 ops/month free | Sufficient for this setup |
Advanced | $0.05/parameter/month | $0.05 per 10,000 ops | Not needed for config storage |
This guide uses: 1 Standard parameter = $0.00/month
Systems Manager (SSM)
All SSM services used in this guide (Distributor, Fleet Manager, Run Command, Maintenance Windows, etc.) are free with no additional charges.
SSM Operations: $0.00/month
Total Cost Summary
Cost Per Instance
CloudWatch Custom Metrics: $0.30/month
SSM Parameter Store: $0.00/month
SSM Operations: $0.00/month
Total per instance: $0.30/month
Total Fleet Costs
Fleet Size | Monthly Cost | Annual Cost |
10 instances | $3.00 | $36.00 |
50 instances | $15.00 | $180.00 |
100 instances | $30.00 | $360.00 |
500 instances | $150.00 | $1,800.00 |
1,000 instances | $300.00 | $3,600.00 |
Reference:
AWS CloudWatch Agent Installation Guide
Purpose: Install and configure CloudWatch Agent on existing EC2 instances and Auto Scaling Groups to collect memory metrics.
Target Audience: AWS administrators and DevOps engineers
Estimated Time:
EC2 installation: 15-20 minutes
ASG installation: 30-40 minutes
Prerequisites
Required IAM Permissions
Your EC2 instances must have an IAM role with the following AWS managed policies:
CloudWatchAgentServerPolicy- Allows sending metrics to CloudWatchAmazonSSMManagedInstanceCore- Allows Systems Manager operations
Create IAM Role (If Not Already Configured)
Go to IAM Console → Roles → Create role
Select AWS service → EC2 → Next
Attach policies:
CloudWatchAgentServerPolicyAmazonSSMManagedInstanceCore
Name:
CloudWatchAgent-EC2-RoleAttach this role to your EC2 instances:
EC2 Console → Select instance → Actions → Security → Modify IAM role
Verify Systems Manager Access
Ensure your instances appear in Systems Manager → Fleet Manager:
Status should be “Online”
If missing, verify IAM role is attached and SSM agent is running
Configuration Setup
Create Memory Metrics Configuration
This configuration collects only memory utilization metrics to minimize costs.
Go to Systems Manager Console → Parameter Store
Click Create parameter
Configure:
Name:
/cloudwatch-agent/config/memory-onlyType: String
Value: Copy the JSON below
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"metrics": {
"namespace": "CWAgent",
"metrics_collected": {
"mem": {
"measurement": [
{
"name": "mem_used_percent",
"unit": "Percent"
}
],
"metrics_collection_interval": 60
}
}
}
}Click Create parameter
What this configures:
Collects memory utilization percentage every 60 seconds
Publishes to CloudWatch namespace
CWAgentMetric name:
MemoryUtilization
EC2 Installation Guide
For installing CloudWatch Agent on existing EC2 instances.
Method 1: One-Time Installation (Recommended for Small Fleets)
When to use: Installing on specific instances immediately.
Overview: Installation is a two-step process:
Install the CloudWatch Agent software (the program itself)
Configure the agent (tell it what metrics to collect from where)
Both steps are required and must be done in order.
Step 1: Install CloudWatch Agent Package
This installs the CloudWatch Agent software on your instances.
Go to Systems Manager → Distributor
Click AmazonCloudWatchAgent
Click Install on a schedule
Configure:
Name:
Install-CloudWatch-Agent-EC2Installation configuration:
Installation type: Uninstall and reinstall
Action: Install
Specify targets:
Target selection: Choose instances manually (or specify by tags)
Select your EC2 instances
Click Add
Schedule:
No schedule (executes immediately)
Rate control:
Leave defaults
Click Create Association
Step 2: Configure CloudWatch Agent
This tells the agent what metrics to collect and where to send them. It applies the memory-only configuration you created in Parameter Store.
Go to Systems Manager → Run Command
Click Run command
Select document:
AmazonCloudWatch-ManageAgentConfigure parameters:
Action:
configureMode:
ec2Optional Configuration Source:
ssmOptional Configuration Location:
/cloudwatch-agent/config/memory-onlyOptional Restart:
yes
Targets: Select the same instances
Click Run
✅ Result: CloudWatch Agent is installed and configured. Metrics will appear in CloudWatch within 2-3 minutes.
Method 2: Scheduled Installation via Maintenance Windows
When to use: Regular updates, compliance checks, or managing large fleets.
Step 1: Create Maintenance Window
Go to Systems Manager → Maintenance Windows
Click Create maintenance window
Configure:
Name:
CloudWatchAgent-Installation-WindowDescription:
Installs and configures CloudWatch AgentUnregistered targets: ✅ Check “Allow unregistered targets”
Schedule:
rate(7 days)or your preferred scheduleDuration:
1hour
Click Create maintenance window
Step 2: Register Target Instances
Select your maintenance window (checkbox)
Click Actions → Register targets
Configure:
Target name:
EC2-InstancesTarget selection: Specifying tags
Tag key: Choose a tag that identifies your instances (e.g.,
Environment)Tag value: The tag value (e.g.,
Production)Click Add
Click Register target
Step 3: Register Installation Task
Select your maintenance window (checkbox)
Click Actions → Register Run command task
Configure:
Task details:
Name:
Install-CloudWatch-AgentDescription:
Installs CloudWatch Agent package
Command document:
AWS-ConfigureAWSPackageTask priority:
1Targets: Select the registered target group
Parameters:
Action:
InstallInstallation Type:
Uninstall and reinstallName:
AmazonCloudWatchAgent
Rate control:
Concurrency:
1targetsError threshold:
1errors
IAM service role: Leave auto-selected (blank)
Click Register Run command task
Step 4: Register Configuration Task
Select your maintenance window (checkbox)
Click Actions → Register Run command task
Configure:
Task details:
Name:
Configure-CloudWatch-AgentDescription:
Configures CloudWatch Agent
Command document:
AmazonCloudWatch-ManageAgentTask priority:
2(runs after installation)Targets: Select the registered target group
Parameters:
Action:
configureMode:
ec2Optional Configuration Source:
ssmOptional Configuration Location:
/cloudwatch-agent/config/memory-onlyOptional Restart:
yes
Rate control:
Concurrency:
1targetsError threshold:
1errors
Click Register Run command task
✅ Result: CloudWatch Agent will be installed/updated automatically according to your schedule.
Auto Scaling Group Installation Guide
For automatically installing CloudWatch Agent on all ASG instances, including newly launched ones.
Overview
Auto Scaling Groups present a unique challenge: new instances can launch at any time. Using Maintenance Windows with tag-based targeting ensures automatic installation.
Step 1: Tag Your ASG Instances
Ensure your ASG is configured to tag instances:
Go to EC2 → Auto Scaling Groups
Select your ASG → Details tab
Scroll to Tags
Add tag (if not present):
Key:
ASGValue:
CloudWatchAgent✅ Tag new instances: Enabled
Step 2: Create Maintenance Window
Follow the same process as EC2 Method 2, Step 1:
Systems Manager → Maintenance Windows → Create maintenance window
Configure:
Name:
CloudWatchAgent-ASG-InstallationUnregistered targets: ✅ Must be checked (critical for ASG)
Schedule:
rate(30 minutes)(frequent checks for new instances)Duration:
1hour
Why frequent schedule?: New ASG instances will get the agent installed within 30 minutes of launch.
Step 3: Register ASG Instances as Targets
Select maintenance window → Actions → Register targets
Configure:
Target name:
ASG-InstancesTarget selection: Specifying tags
Tag key:
ASGTag value:
CloudWatchAgentClick Add
Click Register target
Step 4: Register Installation Task
Same as EC2 Method 2, Step 3:
Select window → Actions → Register Run command task
Command document:
AWS-ConfigureAWSPackagePriority:
1Parameters:
Action:
InstallInstallation Type:
Uninstall and reinstallName:
AmazonCloudWatchAgent
Targets: Select ASG target group
Rate control: Concurrency
1, Error threshold1
Step 5: Register Configuration Task
Same as EC2 Method 2, Step 4:
Select window → Actions → Register Run command task
Command document:
AmazonCloudWatch-ManageAgentPriority:
2Parameters:
Action:
configureMode:
ec2Optional Configuration Source:
ssmOptional Configuration Location:
/cloudwatch-agent/config/memory-onlyOptional Restart:
yes
Targets: Select ASG target group
Verification
Check CloudWatch Metrics
Go to CloudWatch Console → Metrics → All metrics
Under “Custom namespaces”, find CWAgent
Click CWAgent → InstanceId
You should see all instances with
mem_used_percentmetricSelect instances to view graphs
Timeline: First metrics appear 2-3 minutes after agent configuration.
