About Rajith Delantha

Rajith is an software engineer, open source contributor and love to develop application based on open source projects.

Complete Guide To Deploy Java Web Application in Amazon Ec2 using Eclipse

Hi readers,
Today I’m going to show you how to deploy simple java web application in amazon ec2 using Eclipse IDE.
Before we begin we need some required things,
OK, lets start, here we go….
Step 1
  • First you have to install the AWS toolkit for eclipse plugin. Simply go to Help–> Eclipse Market Place –> Search Amazon
  • You will get the AWS toolkit for eclipse .
  • Click Install
  • It will show the corresponding packages and after agree the license will install it. Just a simple procedure.

Step 2
  • Windows –> Preferences –> select AWS Toolkit and Fill the fields according to your amazon ec2 account
  • Give your name to Account Name (Not Necessary), but give exact value to Access Key ID and Secret Access Key according to your amazon acc.
  • In the optional configuration (Expand it) give account id (exact value) to that field.

Step 3
  • Windows –> Show view –> Other –> Select AWS toolkit view (Select all views) –> OK
  • Now you can see the perspective view of aws.

Step 4
  • Now the configuration part is over.
  • Lets create a Amazon ec2 server. To do that File –> New –> Other –> Server –> server –> select amazon ec2 or amazon elastic server tomcat version 6 (you can either choose tomcat version 7)
  • Fill the fields and Finish. (Hope you have some basic understand about eclipse)                                       

Step 5
  • Now create a Dynamic Web project. File –> New –> Other -> Web –> Dynamic Web Project
  • Give whatever name you like.
  • Choose AWS Ec2 or Elastic runtime as a target runtime.
  • Click Finish


Step 6
  • Now create a servlet and Finish
  • Change the doGet() in servlet (Only for demo. This is where your code goesssss)

Step 7
  • Right click Servlet –> Run as –> Run On server –> Select the server you above create and Finish.

Step 8
  • Eclipse will automatically open the web page that you created. (Or in server tab right click the server and select amazon web service –> running)
Thats it…..
Just a simple procedure but you can expand this in your war… its up to you.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

3 Responses to "Complete Guide To Deploy Java Web Application in Amazon Ec2 using Eclipse"

  1. vikram says:

    Hello I’m having a problem with eclipse configuration as i done the access key and secret key configuration but still aws explorer show unable to connect i need to connect aws s3 storage.

    i have valid user ID i can create bucket and upload my files in aws website page but i cant locate the aws in eclipse i’m using Kepler and downloaded Sdk all done but still i’m unable to connect through eclipse

    please help me

  2. Adam says:

    Images are missing in this article

Leave a Reply


six × 1 =



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close