- Newest
- Most votes
- Most comments
This error indicates that the SSM Agent on your EC2 instance is unable to establish a connection with the Systems Manager endpoint. This is a common issue that can occur due to various reasons. Here are some steps you can take to troubleshoot and potentially resolve the issue:
-
Check your instance's security group and VPC settings. Ensure they allow HTTPS (port 443) outbound traffic to the Systems Manager endpoints in your region. These endpoints typically include ssm.[region].amazonaws.com, ec2messages.[region].amazonaws.com, and ssmmessages.[region].amazonaws.com.
-
Verify that the IAM instance profile attached to your EC2 instance has the correct permissions for Systems Manager. It should have the necessary policies to allow the instance to communicate with the SSM service.
-
If your VPC doesn't have internet access, you may need to set up VPC endpoints for Systems Manager to allow outbound traffic from your instance.
-
Investigate potential network connectivity problems. The issue could be due to firewall restrictions, routing problems, or lack of internet connectivity.
-
Check the SSM Agent logs on your instance. For Linux instances, these are typically located in /var/log/amazon/ssm/. For Windows instances, check %PROGRAMDATA%\Amazon\SSM\Logs.
-
Consider running the SSM CLI diagnostic tool to gather more information about the issue. On Linux, you can use the command: ssm-cli get-diagnostics --output table
-
Ensure that your instance can reach the Instance Metadata Service (IMDS), as this is required for SSM Agent to function properly.
If these steps don't resolve the issue, you may need to reinstall or update the SSM Agent on your instance. However, since you're unable to connect using Session Manager, this might be challenging. As a last resort, you might need to stop and start the instance, as you've been doing. If the problem persists, you may need to engage AWS Support for further assistance.
Sources
SSM Ping status Connection lost | AWS re:Post
Troubleshooting Session Manager - AWS Systems Manager
SSM Agent is not online. The SSM Agent was unable to connect to a Systems Manager endpoint to register itself with the service. | AWS re:Post
answered 2 years ago
Relevant content
asked 3 years ago
asked 3 years ago
