amazon-web-servicesamazon-ec2aws-ssmaws-session-manager

AWS SSM session manager not showing instances


I added the policy: AmazonSSMManagedInstanceCore to the instance profile of the windows instance (which is running the SSM agent)... but it doesn't show up under session manager.

It keeps saying: "There are no instances which are associated with the required IAM role." Any idea what is causing this?

(I've tried with an amazon linux 2 instances as well -- same result).

Edit: Yes the instance is in a private subnet, with possibly no internet access -- so this is the likely problem.


Solution

  • aws session manager established communication with ec2 instance with SSM api (using websockets). The subnet your instance is in must have access to the internet, via NAT gateway for example (if it's in a private subnet) or you must create the following VPC endpoints: