AWS Systems Manager isn't working with my EC2

0

Hi,

  1. So I created one VPC, with public/private subnet.
  2. I also created my EC2 instance, link my vpc & public subnet to it.
  3. EC2 has public IP and role AmazonSSMRoleForInstancesQuickSetup
  4. I created my security group with 80/443 open and no public ssh.

After that I can't login to my instance ec2. I just have ** Can't connect to your instance** ...

I followed all steps on documentation AWS.

Thanks for help

Alex
已提问 4 个月前248 查看次数
3 回答
1

Does your subnet have a default route to an internet gateway. Have a look in the route table that your subnet is using, and see if you have a default route to an IGW associated with your VPC. If this is not the case, the SSM agent cannot reach the SSM endpoint.

Should you not want to have a route to the public internet, you need to create SSM interface endpoints in your VPC. You can read about how to do that here: https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-create-vpc.html

AWS
专家
已回答 4 个月前
profile picture
专家
已审核 4 个月前
  • Inside my public subnet route I have this ::/0 | igw-xxxxxxxxxxx | Active 0.0.0.0/0 | igw-xxxxxxxxxxx | Active

    I am trying to understand but nothing for the moment, i'm stuck

0

Hi, Do you have SSM agent installed on EC2?

profile picture
已回答 4 个月前
0

Hello,

I have had this exact same issue when I run immersion days with customers. Here are a few things to try.

  1. If the role is attached and still cant use Session Manager. Go to IAM Dashboard and review you have the following policies applied to your IAM role AmazonSSMManagedInstanceCore.
  2. Next thing to check is to make sure your EC2 instance has a Public IP address assigned to it. If it does not have a Public IP address you will need to terminate the instance and redeploy the instance with a Public IP address.
  3. Make sure you have created an Internet Gateway and have attached the proper VPC to the Internet Gateway.
  4. Make sure your route table has a default route 0.0.0.0/0 pointing to the Internet Gateway
  5. If you are still having issues. I recommend to delete your EC2 Instance. And create a new IAM role with policy AmazonSSMManagedInstanceCore and redeploy the EC2 instance. This has worked for a few students.
  6. Another thing to note if there are any transit gateways deployed, I would double check all routes and attachments are configured properly as this has also been an issue in the past
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则