1

How to get a list of process running on Amazon EC2 instances via the AWS API?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Vijay Pendse
  • 111
  • 4
  • 8

2 Answers2

3

This could be accomplished by using the Amazon EC2 Systems Manager Run Command, which uses an agent installed on EC2 instances to run remote commands.

It takes a bit of configuration, but allows you to run commands on potentially hundreds of instances with one command.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
1

This isn't possible. The EC2 API doesn't provide any actions to perform operations or retrieve data from the operating system layer.

mickzer
  • 5,958
  • 5
  • 34
  • 57
  • **In principle**, you're absolutely correct. The EC2 infrastructure has no visibility into what's running on an instance... but AWS does have a relatively new optional agent daemon that can be installed that allows commands to be run on instances (and output fetched) via the API. – Michael - sqlbot Apr 24 '17 at 20:00