Hello all. I am having trouble understanding when to use Run Command versus State Manager . With Run Command you create a SSH tunneless connection to an instance or instance and you can then run commands on that instance or run documents(which are essentially scripts?). For running scripts then we would use State Manager with specified documents? Whats the difference between the 2? Im seeing now there is no connection establish with State Manager so is it more about managing the "state" of the instance versus just running a command or 2? Could someone clarify this for me please. thank you!
The Run Command allows to you issue an command to managed instances right now, to be performed once. These commands may or may not alter the configuration state of the OS on the managed instance.
State Manager is similar to Chef, Puppet, or Ansible. SSM hands a set of instructions to the managed instanced and says "keep yourself configured like this until I tell you otherwise". State Manager allows a system to regularly check itself against the SSM’s instructions, and adjust for configuration drift automatically.
So, you use the Run Command when you need to make one or more managed instances do something (which may or may not be OS configuration) once, right now, and State Manager to apply a configuration to one or more managed instances which the managed instance can automatically maintain until new instructions are received.