Post

How to deploy your webapp on tomcat with AWS EC2 and RDS

In this blog I am going to show you we can deploy our application using Amazon Ec2 and RDS. For this we need Amazon web services Ec2 and Rds services.

Steps to deploy your application on AWS EC2 and RDS Service

  1. Create a free tier account on aws and select region. I will follow this tutorial create account.

  2. To run your application you required virtual machine. We can create this by using create EC2 instance.

  3. We required relational database to connect your application.We can create this by using create RDS.Here i will select mysql database instance.

  4. Now our both services running on aws.

  5. Go to our application in eclipse or intellijId and convert into war or jar file. but make sure to remember edit database configuration detail as per your RDSbefore going to convert into war file.

  6. Install tomcat server on your ec2 service by using Install tomcat follow the step by step guide.

  7. Go to root directory on ec2 instance and use command sh startup.sh it will run your tomcat server on ec2 on port 8080.

  8. You can access your tomcat server use public network Ip of your instance and run tomcat on your local by http://server_ip:8080.

  9. Deploy your application on tomcat server i.e deploy your war file on tomcat and check your database running on RDS should be connected.

  10. And that’s it by this way we can deploy our application on AWS CLOUD as a infrastructure without maintaining on premises server and database.

This post is licensed under CC BY 4.0 by the author.