Runs a command when EC2 instances change.