Skip to content

SSH via SSM SM: start host if offline

Olivier JACQUES requested to merge cloud9-autostart into main

The SSH proxycommand script will now start the EC2 instance automatically if it is offline

EC2 i-0e1c8561a0597a07b status: None
Instance is offline. Please wait while I start it...
{
    "StartingInstances": [
        {
            "CurrentState": {
                "Code": 0,
                "Name": "pending"
            },
            "InstanceId": "i-0e1c8561a0597a07b",
            "PreviousState": {
                "Code": 80,
                "Name": "stopped"
            }
        }
    ]
}

Current status: None, try 1/10
Current status: None, try 2/10
Current status: None, try 3/10
Current status: None, try 4/10
Current status: Online, try 5/10
{
    "RequestId": "d6cb7665-a848-4e0c-8a2b-da436fb27cf4",
    "Success": true
}


Starting session with SessionId: olivier.jacques.ext@safrangroup.com-0f0976fc60161bf3e

Merge request reports