{"id":17095,"date":"2026-05-08T10:00:00","date_gmt":"2026-05-08T16:00:00","guid":{"rendered":"https:\/\/www.supportpro.com\/blog\/?p=17095"},"modified":"2026-05-10T21:41:31","modified_gmt":"2026-05-11T03:41:31","slug":"how-to-monitor-and-alert-ssm-agent-health-with-aws-config-eventbridge-and-lambda","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/how-to-monitor-and-alert-ssm-agent-health-with-aws-config-eventbridge-and-lambda\/","title":{"rendered":"How to Monitor and Alert SSM Agent Health with AWS Config, EventBridge, and Lambda"},"content":{"rendered":"\n<p>Managing EC2 instances at scale requires ensuring that all instances are properly configured and connected to AWS Systems Manager (SSM). Issues like missing or non-responsive SSM Agents and unmanaged instances can create operational gaps and disrupt automation. To solve this, we can use AWS Config, Amazon EventBridge, and AWS Lambda to build a monitoring and alerting system that continuously checks compliance, detects SSM Agent health issues in real time, and triggers alerts or remediation &#8211; improving visibility, security, and control across your AWS environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A. Checking EC2 Instances for SSM Agent Health Issues<\/h2>\n\n\n\n<p>Before implementing monitoring, first log in to the AWS Console and validate your EC2 environment for the following conditions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>SSM Agent is not installed<\/strong><br>Identify EC2 instances where the AWS Systems Manager (SSM) Agent is missing, which prevents remote management and automation.<\/li>\n\n\n\n<li><strong>SSM Agent is stopped or not responding<\/strong><br>Detect instances where the SSM Agent is installed but inactive, unhealthy, or failing to communicate with AWS Systems Manager.<\/li>\n\n\n\n<li><strong>SSM is not managing the instance<\/strong><br>Find EC2 instances that are not properly registered or managed by AWS Systems Manager, often due to missing permissions or configuration issues.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture Flow for Monitoring &amp; Alerting<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>EC2 Instance<br>      \u2193<br>AWS Config (Managed Rule)<br>      \u2193<br>EventBridge (NON_COMPLIANT Event)<br>      \u2193<br>Lambda Function<br>      \u2193<br>SNS \/ Email \/ Slack \/ Auto-remediation<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">B. Prerequisites<\/h2>\n\n\n\n<p>Before setting up monitoring and alerting, ensure the following requirements are in place:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>IAM Role for EC2 Instances<\/strong><br>Each EC2 instance must have an IAM role attached with the <code>AmazonSSMManagedInstanceCore<\/code> policy to enable Systems Manager access.<\/li>\n\n\n\n<li><strong>Enable AWS Config<\/strong><br>AWS Config must be enabled to continuously evaluate resource compliance and track configuration changes.<\/li>\n\n\n\n<li><strong>Install SSM Agent on EC2 Instances<\/strong><br>The SSM Agent must be installed and running on all target instances to allow proper communication with AWS Systems Manager.<\/li>\n\n\n\n<li><strong>Enable Amazon EventBridge<\/strong><br>Amazon EventBridge must be enabled to capture compliance state changes and trigger automated workflows.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.supportpro.com\"><img fetchpriority=\"high\" decoding=\"async\" width=\"927\" height=\"618\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4.jpg\" alt=\"\" class=\"wp-image-17097\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4.jpg 927w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-300x200.jpg 300w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-768x512.jpg 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-585x390.jpg 585w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-263x175.jpg 263w\" sizes=\"(max-width: 927px) 100vw, 927px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">C. AWS Config Rule to Check SSM Agent Health<\/h2>\n\n\n\n<p>To monitor SSM Agent health effectively, you can use an AWS managed rule provided by AWS Config. This helps you automatically evaluate whether your EC2 instances are properly managed by AWS Systems Manager.<\/p>\n\n\n\n<p>AWS offers a built-in rule called <strong>EC2_INSTANCE_MANAGED_BY_SSM<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What This Rule Checks<\/h3>\n\n\n\n<p>This AWS Config rule helps ensure the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Verifies SSM management status<\/strong><br>Confirms whether EC2 instances are being managed by AWS Systems Manager.<\/li>\n\n\n\n<li><strong>Checks SSM Agent availability<\/strong><br>Ensures that the SSM Agent is installed and running on the instance, enabling proper communication with AWS SSM services.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Steps to Enable the Rule<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the <strong>AWS Config<\/strong> console<\/li>\n\n\n\n<li>Navigate to <strong>Rules<\/strong><\/li>\n\n\n\n<li>Click on <strong>Add rule<\/strong><\/li>\n\n\n\n<li>Search for <strong>EC2_INSTANCE_MANAGED_BY_SSM<\/strong><\/li>\n\n\n\n<li>Configure the scope of the rule<\/li>\n\n\n\n<li>Set the resource type as: <strong>AWS::EC2::Instance<\/strong><\/li>\n\n\n\n<li>Review and <strong>Save the rule<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Once enabled, AWS Config will continuously evaluate your EC2 instances and flag any non-compliant resources where SSM is not properly configured or active.<br><a href=\"https:\/\/www.supportpro.com\" title=\"\"><img decoding=\"async\" width=\"624\" height=\"207\" src=\"blob:https:\/\/www.supportpro.com\/ffce4ce0-42b9-47f7-9bf1-baa6a001f81f\"><br><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>D. Capture NON_COMPLIANT Events Using EventBridge<\/h2>\n\n\n\n<p>Once the AWS Config rule is active, the next step is to capture compliance state changes in real time using Amazon EventBridge. This allows you to automatically react whenever an EC2 instance becomes <strong>NON_COMPLIANT<\/strong> with the SSM Agent health rule.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">EventBridge Rule<\/h3>\n\n\n\n<p>Create an EventBridge rule to listen for AWS Config compliance changes. This rule filters events where resources are marked as <strong>NON_COMPLIANT<\/strong>, specifically for the EC2_INSTANCE_MANAGED_BY_SSM rule.<\/p>\n\n\n\n<p>When a violation is detected, the event is forwarded to downstream services such as AWS Lambda for processing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">E. Lambda Function for Alerting &amp; Analysis<\/h2>\n\n\n\n<p>AWS Lambda is used to process NON_COMPLIANT events and trigger alerts or remediation actions. It acts as the core logic layer in the monitoring pipeline, analyzing the event and deciding the next step.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IAM Permissions for Lambda Execution Role<\/h3>\n\n\n\n<p>To ensure the Lambda function can properly interact with AWS services, attach the following permissions to its execution role:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>AWSConfigRulesExecutionRole<\/strong><br>Allows Lambda to interact with AWS Config rules and retrieve compliance data.<\/li>\n\n\n\n<li><strong>AmazonSSMReadOnlyAccess<\/strong><br>Grants read access to Systems Manager data for analyzing instance health and SSM status.<\/li>\n\n\n\n<li><strong>AmazonSNSFullAccess<\/strong><br>Enables Lambda to publish notifications to SNS topics for alerts via email, SMS, or integrated channels like Slack.<\/li>\n<\/ol>\n\n\n\n<p>With this setup, any NON_COMPLIANT EC2 instance is automatically detected, processed by Lambda, and forwarded as an alert or remediation action\u2014ensuring continuous visibility and proactive security management.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3.png\" data-rel=\"penci-gallery-image-content\" ><img decoding=\"async\" width=\"1024\" height=\"473\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-1024x473.png\" alt=\"\" class=\"wp-image-17096\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-1024x473.png 1024w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-300x139.png 300w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-768x355.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-1170x541.png 1170w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3-585x270.png 585w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2026\/05\/image-3.png 1482w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">F. Optional: Auto-Remediation<\/h2>\n\n\n\n<p>To go beyond monitoring and alerts, you can implement <strong>auto-remediation<\/strong> to fix SSM Agent issues automatically without manual intervention. This helps maintain continuous compliance and reduces operational overhead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using SSM Automation Runbook<\/h3>\n\n\n\n<p>You can leverage <strong>AWS Systems Manager Automation Runbooks<\/strong> to define remediation actions for common SSM-related issues.<\/p>\n\n\n\n<p>In this setup, the Lambda function triggered by a <strong>NON_COMPLIANT<\/strong> event invokes an SSM Automation document to remediate the issue.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Automation Actions<\/h3>\n\n\n\n<p>The automation workflow can handle the following scenarios:<\/p>\n\n\n\n<p>a. <strong>Install SSM Agent if missing<\/strong><br>Automatically installs the AWS Systems Manager Agent on EC2 instances where it is not present.<\/p>\n\n\n\n<p>b. <strong>Restart SSM Agent if stopped<\/strong><br>Detects inactive or unresponsive agents and restarts the service to restore connectivity with AWS Systems Manager.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Monitoring SSM Agent health is essential for maintaining secure and manageable EC2 environments. By combining <strong>AWS Config, EventBridge, Lambda, and optional SSM Automation<\/strong>, you can build a fully automated system that not only detects non-compliant instances but also responds to them in real time. This approach improves visibility, reduces manual effort, and strengthens the overall security posture of your AWS infrastructure.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.supportpro.com\/requestquote.php\" title=\"\">Facing challenges with AWS monitoring, EC2 management, or SSM Agent issues?<\/a> <\/p>\n\n\n\n<p>Get expert help from <a href=\"https:\/\/www.supportpro.com\/requestquote.php\" title=\"\">SupportPro<\/a> for reliable cloud support, automation setup, and 24\/7 technical assistance to keep your infrastructure secure and running smoothly.<br><br><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Managing EC2 instances at scale requires ensuring that all instances are properly configured and connected to AWS Systems Manager (SSM). Issues like missing or non-responsive SSM Agents and unmanaged instances&hellip;<\/p>\n","protected":false},"author":37,"featured_media":17098,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[69,3],"tags":[],"class_list":["post-17095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-technical-articles"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/17095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=17095"}],"version-history":[{"count":2,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/17095\/revisions"}],"predecessor-version":[{"id":17101,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/17095\/revisions\/17101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/17098"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=17095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=17095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=17095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}