Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been given a task where I have to utilize about 200 EC2 instances in AWS. Since I'm completely new to AWS, I'm having trouble doing basic stuff.

Each instance is a Ubuntu and they all have the same 4 key softwares installed on them.

I have to be able to control all 200 instances, like starting the same command on every instance, and other similar bulk tasks.


  • Stop all currently running instances.
  • Start all currently stopped instances.
  • Pull a configuration file from the main server.
  • Start certain application (all start app1, app3)

As far as I understood from the starting guides, I have to install AWS CLI which I did. (I'm on a Mac btw). However, I still don't understand how to do the things described from this command line.

TLDR: How do I execute/run commands simultaneously on every running EC2 instance from CLI?

share|improve this question
Stop and Start you can do from the AWS CLI with a for loop or xargs from the describe-instances command – Guy Feb 15 '14 at 15:02
up vote 8 down vote accepted

ClusterSSH, Capistrano, pconsole, and many other tools exist to execute commands across many Linux servers. In addition, you might look into configuration management tools like Puppet, Chef, SaltStack, or Ansible in terms of orchestrating your entire environment.

Generally, the AWS command line interface is for interfacing with the product and services (spinning up instances, taking images, etc), not controlling individual VMs at the console level.

share|improve this answer

Amazon has announced a "Run Command" feature.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.