I have two EC2s installed - one with public IP [EC2-A], the other without [EC2-B].
On both, I have the instance roles required for SSM.
Moreover since I do not have a public IP on EC2-B, I created a VPC endpoint (configured correctly, as prior to the creation of the EC2-B endpoint it was not visible in the fleet manager). Both EC2s are visible in System Manager -> Fleet Manager -> Managed Nodes
.
However, I am unable to connect to EC2-B Using AWS System Manager (aws ssm start-session)
➜ Downloads aws ssm start-session --target i-06d10s2296494c8788
An error occurred (TargetNotConnected) when calling the StartSession operation: i-06d348796494c8788 is not connected.
but when I add the public IP to EC2-B I can do so.
I have the same roles and security group on both EC2s (everything opened for testing). EC2-A works as expected.
View from EC2 -> Connect
Same IAM on EC2-A and on EC2-A there is no error.
Any help guys?
Ok guys for future viewers.
It was not enough to create just one endpoint.
You need 3: