How to deploy a java web application on an ec2 instance
Wouldn’t it be cool if when your ec2 instance starts it has your java web application automatically deployed? This will be especially suitable for those who want to take advantage of AWS Auto Scaling feature.
It’s fairly simple to achieve this. First thing you need to do is to designate a bucket in S3 to keep your builds – war files. You can upload all of your builds here. Each time a new build is added to the bucket you will also update a file – called latest-version.txt – in the bucket which will contain the latest version. (You don’t have to use S3 for this purpose, you can use whatever repository you are using as long as you can keep latest-version.txt there with your war files)
