ssm-helpers icon indicating copy to clipboard operation
ssm-helpers copied to clipboard

[feature] updating SSM agent from ssm-helpers

Open sendqueery opened this issue 5 years ago • 1 comments

As a user of AWS SSM, in some cases, I may try and connect to an instance with an old version of the SSM agent. Because I may want or need to update the agent in order to use ssm-session, it would be nice to have the ability to use the update functionality of SSM to resolve this issue.

In some cases, the StartSession API may return a "TargetNotConnected" error. This indicates that "the specified target instance for the session is not fully configured for use with Session Manager", which can indicate several different issues, including an SSM agent version older than 2.3.68.0.

Fortunately, AWS provides an SSM document ("AWS-UpdateSSMAgent") that can be used to resolve the problem of an outdated agent. This could be implemented as an additional subcommand and/or as an extension of ssm-session.

sendqueery avatar Jul 17 '20 15:07 sendqueery

ssm run --document could be useful in general. We tested that with ssm scp functionallity in the past.

Specifically for AWS-UpdateSSMAgent it should probably be run via state manager scheduled associations as described here https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-state-cli.html

rothgar avatar Jul 17 '20 20:07 rothgar