AWS EC2- Synching source code files with S3 - is it a proper approach?
amazon-ec2, amazon-s3
Solution
I think you're better off using a proper source code repository, like Subversion or Git, rather than storing the source files on S3. That way you can have a central location for the source files while avoiding the update consistency problems that kdgregory mentioned.
You can put the source repository on one of your own servers outside of EC2, or host it on an EC2 instance (make sure the repository files are on an EBS volume in the latter case).
Problem
On an app server in which a few source files change frequently, Is the following approach recommended? Use a cron job with S3tools to sync the source files with S3 private bucket (every 15 mins for example). On server start up - Use user data script to sync with the sources bucket to retrieve the latest sources. Advantages: 1. No need to attach EBS for app server just to save a few files 2. Similar setup to all app servers 3. Sources automatically backed up. 4. As a byproduct, distributes code to multiple app servers automatically. Disadvantages: keeping source code on S3 other? What do you think about this methodology? Is this the right way to use EC2 when source code change frequently (a few times a day) please recommend the best approach to run EC2 instances where sources change often.