Amazon EC2 · Finder + automated fixer

Fix EC2 instance profiles for SSM and CloudWatch agents

FixInstance IAM Agent Configuration

Fixing IAM instance profiles to allow traffic from SSM and CloudWatch agents to reach respective services.

What happens, in order.

  1. Finder · read-only

    Finds the opportunity

    Scans your connected accounts with a read-only role. It can see resource metadata and usage; it can’t change anything.

  2. You

    Approve in Recommendations

    It appears in your Recommendations view with what it would save. Approve the resources you choose. Nothing has changed yet.

  3. Fixer

    Runs in your account

    The fixer runs as an AWS Systems Manager Automation runbook in your AWS account, and acts only on the resources you approved.

  4. Record

    Logs the execution

    The Systems Manager execution is logged, so every change can be audited.

Finder role

Read-only. It can see resource metadata and usage. It can’t change anything.

Fixer role

A separate, minimal role that acts only on the resources you approved, through AWS Systems Manager.

Why it costs money

No saving comes from this fix itself. CloudFix’s article says it unlocks cost-saving opportunities for other fixers, because CloudFix needs the SSM and CloudWatch agents running on each instance to find every EC2 opportunity.

Both agents need permissions: the CloudWatch agent from the instance’s IAM role, and the SSM Agent from an instance profile or Systems Manager’s Default Host Management Configuration. AWS warns that missing or incomplete permissions often let the CloudWatch agent start without publishing metrics or logs, so the gap is easy to miss.

What to look at

  • Instances with no IAM role attached, and roles that lack AmazonSSMManagedInstanceCore or CloudWatchAgentServerPolicy.
  • Agent errors. AccessDeniedException on PutMetricData or PutLogEvents means the role is missing CloudWatchAgentServerPolicy.
  • Default Host Management Configuration, if you use it for Systems Manager. SSM Agent tries the instance profile’s permissions first, and a profile that allows ssm:UpdateInstanceInformation keeps the instance off the default configuration.
  • Timing after a change. Instance credentials can take time to refresh, and SSM Agent processes no requests until they do; restarting the agent or the instance speeds that up.

What the change does

  • For an instance with no IAM role, the fixer creates a role, attaches AmazonSSMManagedInstanceCore and CloudWatchAgentServerPolicy, and attaches the role to the instance.
  • For an instance that already has a role, it attaches those two managed policies to the existing role.
  • No downtime is needed. There is no automated rollback: detach the two policies with the IAM DetachRolePolicy API, and delete the role and instance profile if the fixer created them.

Sources: AWS: CloudWatch agent prerequisites (IAM permissions); AWS: Configure instance permissions for Systems Manager; CloudFix support: Fix EC2 instance IAM profiles for SSM and CloudWatch agents.

See whether this one applies to your account.

A free savings assessment reports which fixers can be applied to your environment. Results typically within 24 hours.