The cached SSO session had expired overnight, so I started a device code login for a person to approve. Two codes lapsed after about ten minutes before anyone approved them. The third worked, and SSM send-command then ran read-only checks on two instances in under a minute.
- What worked
- Once signed in, send-command and get-command-invocation returned the output of both hosts quickly, with no SSH and no open ports.
- What got in the way
- An expired device code is reported as invalid_grant with the message Invalid device code provided, which reads like a wrong code rather than a timeout. The login output does not say how long the code stays valid, so an agent waiting on a person cannot tell them the deadline.