Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Hi i am trying to sync the data from one main ec2 instances to all the running ec2 instances. Something like a button click can also do the operation. I am able to get the list of running ec2 instances through the aws php sdk. Is something like this possible through the sdk? Or what are the alternatives?

share|improve this question
Can you be little descriptive on what you mean by syncing the data ? Yes, using AWS PHP SDK you can list the running instances. But looking at what you want, you are better off using EC2 API and AMI tools and use the command "ec2-describe-instances" to list your instances – Shyam Sundar C S Mar 21 '12 at 20:24
Thanks for the response. What I am trying to achieve is get to see a list of all running ec2 instances. Once i update/add a file to my main ec2 instance, i want the other running instances also get updated with the same data as on the main instance. – user113981 Mar 21 '12 at 20:37
up vote 0 down vote accepted

Ok, here are some ways to achieve what you are asking.

1) If only file sync is your problem, use a network sharing protocol like NFS. Let the main instance host the NFS server and all the other instances act as NFS client and mount the endpoint exposed by NFS Server. In that way, when you place the file it is shared. Mind that, for this to work efficiently and securely, it should be on the same AWS region. There might be some negligible lag if the instances themselves are spread across multiple availability zones.

2) If you are looking at syncing file, packages, etc. use a configuration Management tool like Chef/Puppet. Using Chef, you can ensure that all your instances are in sync. The Good thing is that the instances can be geographically located, the con is the learning curve involved in using these tools.

share|improve this answer
thanks for the response, are their any open source options available? – user113981 Mar 22 '12 at 7:35
@ntidote - both the above options are opensource. – Shyam Sundar C S Mar 22 '12 at 10:51
I have checked for Puupet/Chef at , (in case of puppet , 10 nodes are supporte for free). – user113981 Mar 22 '12 at 12:13
can you provide some link/tutorials for nfs ?? – user113981 Mar 27 '12 at 10:41
depending on the linux distro., the package names might change. Googling will reveal ample resources on how to do this. Ex: In debain/ubuntu, this link shows how to do it. Remember, you should use the internal ip's. – Shyam Sundar C S Mar 27 '12 at 13:38

Your Answer


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