Recently I have created a web application. The application has some static parts (libraries, classes etc) and dynamic parts (images, cache, log etc) as well. However, some static parts of the app would need rare changes. Let's call them partially static. As a whole there are static, partially static and dynamic parts.
So I am trying to adapt my app to Amazon AWS (EC2 and S3). I don't think it is a good idea to put all the application files to an EC2 instance. I am thinking to put static and partially static parts to EC2 and dynamic parts to S3.
- As soon as I get the application stabilized on EC2, I will create an AMI and copy it to new instances.
- Whenever I need change in partially static parts, then I would terminate all EC2 instances except one, and make changes. After changes, I would create new instances.
- Dynamic parts like uploaded files, images etc. will be shared by all instances and not cause any synchronization problems.
Is this an appropriate way to use EC2 and S3?