This article guides you to setup of your own infrastucture. I am still using OS Windows, but few things you need to do, e.g. SSH connection to your EC2 image are simplier to do in Linux. So let's go!
Sign in to Amazon WS and launch image
First of all, you need to create your personal account on Amazon WS, if you don't have any. I signed in to S3 and EC2 services to achieve my application's requirements. After successful registration, I followed a great AWS Management Console, where you can manage your EC2 instances, S3 bucks and other Amazon services. I launched Amazon Linux 32-bit image on Micro Instance. Note, that there are also many preconfigured Community images with complete Java, Tomcat and MySQL stack. Images based on OS with its own GUI (e.g. Ubuntu Desktop, or Windows) allows you to connect thru remote desktop, which is also interesting possibility. I decided to use simpliest image to do the things my way. Amazon Linux AMI comes with preinstalled Open JDK 6. Also note, you have to select ESB based image, if you want to use free tier. I used Putty for SSH connection to my image. Documentation is available in Geeting Started Chapter of EC2 Documentation.Install Java
Amazon Linux AMI comes with preinstalled Open JDK 6. I changed JAVA_HOME variable for Tomcat, which now points to JDK instead of preconfigured JRE.Install Tomcat
Amazon Linux AMI is similar to CentOS, so I used this article for installing Tomcat 6 (or other version).If you want connect to your Tomcat application from public web, don't forget to allow port 8080 (or other depends on your configuration) in Security Group Section of AWS Management console.
I also installed Tomcat native library with following command:
sudo yum install tomcat-native.i686