How to initiate Session Manager session using CLI

Tonight I want to connect to an EC2 instance that resides in a private subnet. I currently don’t have a bastion host I can use as an intermediary to jump to this instance. Well, as you might have guessed from this post’s title, the AWS Session Manager is something that might be helpful in this case. So, join me in this journey to configure and set up the Session Manager, using AWS CLI only....

July 5, 2024 · 4 min · 767 words · kenno

Get connection status for a managed node with AWS CLI

I kept forgetting about the AWS CLI which is quite handy to quickly check if SSM is working on an EC2 instance. So here it is again for my future-self. Use get-connection-status to return the connection status of the specified managed instance. $ aws ssm get-connection-status --target i-092af3b3c1234567 { "Status": "connected", "Target": "i-092af3b3c1234567" } Reference: get-connection-status

June 26, 2024 · 1 min · 56 words · kenno