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 個月前

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

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

回答問題指南