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

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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠