AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

For SSM when to use State Manager vs Run Command?

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!

1 Answers

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.


Thank you for the quick response Steve that makes sense. I remember looking at a practice question that asked about moving logs at a specific time everyday from a server to S3. Would Automation be best for this or does that count more for the State of the instance?


I just remembered that with Automation you cant schedule based on time, which is strange no? So using State Manager is the only way to do it

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?