跳至內容

Unable to connect EC2 instance via Session Manager

0

I am at the point of recertification of my cloud architect certificate via https://cloudquest.skillbuilder.aws/callback. Connecting-vpc/MarketingServer via SessionManager has not been possible. Each time I clicked connect on SessionManager window, an error message (Network Failure) will popup. I ha[[]()]()ve been on this spot for the last three days. All efforts to restart/refresh have not yielded any positive result. Network Failure

已提問 5 個月前檢視次數 123 次
2 個答案
0

To resolve your issue with connecting to an EC2 instance via Session Manager, I'll provide several troubleshooting steps:

  1. IAM Role Permissions:
  • Verify that the EC2 instance has an IAM role attached with the necessary permissions
  • The role should include the AmazonSSMManagedInstanceCore managed policy or equivalent permissions
  • This policy grants the required permissions for Systems Manager functionality
  1. Instance Configuration:
  • Ensure the SSM agent is installed and running on your EC2 instance
  • Check the SSM agent logs at /var/log/amazon/ssm/amazon-ssm-agent.log for any errors
  1. Network Configuration:
  • Check the security group associated with your EC2 instance
  • Ensure it allows inbound and outbound traffic on port 443 (HTTPS) for Session Manager connections
  • Verify that the subnet where your EC2 instance resides has proper routing to communicate with Systems Manager endpoints
  • If the instance is in a private subnet, it might require a NAT gateway for outbound internet access
  1. VPC Endpoints:
  • If you're using VPC endpoints, ensure they're configured correctly to allow traffic to and from Systems Manager endpoints
  1. Instance Status:
  • Confirm your EC2 instance is in the "running" state and reachable over the network
  1. Session Manager Configuration:
  • Verify that Session Manager is enabled in your AWS account and configured correctly
  • Check the Session Manager settings in the AWS Systems Manager console
  1. Network ACLs:
  • If you're using network ACLs, ensure they allow the necessary traffic for Session Manager

If these steps don't resolve the issue, you might want to try rebooting the instance or using an alternative connection method temporarily while troubleshooting the Session Manager connection.
Sources
Unable to Connect to EC2 Instance via SSM Session Manager | AWS re:Post
Can't connect to Linux instance even after the health status checks pass | AWS re:Post

已回答 5 個月前
專家
已審閱 5 個月前
0

Also check your local firewall on your Machine incase its blocking traffic to AWS SSM public Endpoint

專家
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。