I use SSM to connection to windows ec2 instances with the cli: aws ssm start-session --target <id>
It takes the ssm service on a windows instance a few mins to start sometimes
I can check when its done initializing like this aws ec2 wait instance-status-ok --instance-ids <id>
But even after its done initializing it frequently takes another 30 secs or a min to start the agent- sometimes even more
I really dont want to write my own logic/polling script for doing this
Is there some aws cli command that uses run command or something to poll for when an instance is connected like aws ec2 wait instance-status-ok
?
EDIT: so there is this aws ssm get-connection-status
but if a wait
command exists Id much prefer it so I dont need to have my own logic/while loop.