Hi i have started with aws and found out that we can get a list of running servers with the aws php sdk. Is there any other way to get the list of all ec2 instances? after getting the list i want to sync the data from one main instances to all the instances. Something like a button click can also do the operation. Are rsync, incron the only options, or it can be done by aws php sdk also. Please provide some tutorial links.
I think you would use the AWS php sdk;
Run through the getting started guide to setup your keys;
And then use the describe_instances function to collect an array of instances;
It looks like you could either construct and filter to return only running instances, or then loop over the returned like to to get more detailed information using the describe_instance_status function;
Something tlike the following will work...
instance state code 16 is for "running"