AWS News Blog
AWS Elastic Beanstalk Eclipse Integration
|
You can create, test, debug, and deploy an AWS Elastic Beanstalk application from within the comfort of the Eclipse IDE. The newest version of the AWS Toolkit for Eclipse includes a brand-new plug-in that lets you deploy Java web applications to Elastic Beanstalk from within Eclipse. This toolkit includes the AWS SDK for Java along with tools to manage EC2, SimpleDB, and Elastic Beanstalk. You can develop your application locally and then deploy it to Elastic Beanstalk or you can do all of your development and test deployments to Elastic Beanstalk if you’d like.
You must first install the toolkit by opening up the Eclipse Help menu and choosing Install New Software… .
You will need to add the location http://aws.amazon.com/eclipse/ to the list of sites. Once you have done this, Eclipse will walk you through the process of selecting the components to install, agreeing to the license, and installing the components. You will need to restart Eclipse to finalize the installation.
The AWS Toolkit for Eclipse is accessible through the menu with the AWS logo:
The next step is to create a new AWS Java Web Project. You will be prompted to enter your AWS Access Key ID and your Secret Access Key. You can start with an empty project or you can include a complete AWS-powered reference application called Travel Log by simply checking a box:
Within a few seconds the project is ready to go:
From here, you can define AWS Elastic Beanstalk as the server to be used when you run the application. That’s really easy choose the server type (AWS Elastic Beanstalk for Tomcat 6), choose the AWS Region (Elastic Beanstalk will be available in US East (Northern Virginia) to start), and assign names to the Application and the Environment, and (optionally) set up a Key Pair, an SSL Certificate ID, a CNAME, a health check, and an email address for notifications:
Before you can run a particular version of your code on Elastic Beankstalk you need to name it. The Eclipse Toolkit will propose a name for you and you can simply agree to use it:
And the Travel Log application is up and running. It is visible from within Eclipse, although it requires JavaScript and works a bit better in a standalone web browser
The Travel Log application runs on EC2, stores original and thumbnailed images in Amazon S3, tracks information about each photo and log entry in Amazon SimpleDB, and can also send email notifications using the Simple Notification Service. Please feel free to browse through the sample code and to adapt it for use in your own application.
I hope that you have enjoyed this tour of the AWS Toolkit for Eclipse and that it gives you a good sense of how you can use it to build and deploy your own applications on Elastic Beanstalk.
Keep Reading: AWS Elastic Beanstalk APIs and Command Line Tools.
— Jeff;