Preface
Thank you for picking up a copy of this book. Amazon Elastic Beanstalk is one of Amazon AWSs services. It offers a platform for easy deployment of web applications. The first version of Elastic Beanstalk handles Java applications running in a Tomcat container. Deploying an application has been made as easy as uploading your WAR to your Application Environment.
Elastic Beanstalk is difficult, and barely understood. But it has been a huge hit with the media following cloud trends. We have seen headlines shouting that Amazon AWS was in the PaaS business, taking on Heroku and Google App Engine. These comparisons are not so interesting, except that they show that expectations are high. There is the idea that the cloud will end all problems, including building and especially deploying applications to large-scale infrastructures.
There is a huge gap between developing web applications in Java and running them on AWS infrastructures that can handle huge traffic. This gap contains things like installing Linux, configuring Tomcat, etc. But it also includes many AWS services, like EC2, Auto Scaling, Elastic Load Balancing, and S3. Elastic Beanstalk tries to hide these details, but it allows you to take over at any level, whenever you require. In a way, it tries to provide an easy entrance to AWS. So, the task at hand is to explain something that has been intentionally left out, because it is often a source of frustration.
We very recently finished our first book, Programming Amazon EC2 . Just before the deadline for that book, Elastic Beanstalk was introduced. We wrote about it briefly, without getting into much detail. But Elastic Beanstalk was the logical next topic to address. We also had plans to build a Scala application called heystaq then, and we decided to use Elastic Beanstalk to deploy it. That became our first real experience with Beanstalk.
The authors of the book have been working together in different ways. We were drawn together to build a prototype of heystaq. We participated in an AWS Hackathon in Amsterdam in April 2011 to create something cool.
heystaq is a tool to visualize AWS infrastructures. We set out to build it in Scala for several reasons: the two most important are scalability and availability of the AWS Java SDK. We have enough Java experience, but Scala was new. And, of course, this project was to be built on Elastic Beanstalk.
Audience
Elastic Beanstalk has intrigued us from the moment it was introduced. It is a service that automates many of the intricacies of building and running Java web applications. We set out to show how you can use Elastic Beanstalk. In the process we had to deal with many Java-related tools like Eclipse and Hudson, as well as introduce other Amazon AWS services like EC2 and Elastic Load Balancing.
It will definitely help to either have a good understanding of Amazon AWS or be intimate with building Java applications. If you are not familiar with either, you should at least be able to coerce Eclipse into building your Java app, or be intimate with building with a tool like maven. If all these terms mean nothing to you, you are probably looking for another book.
With this book we want to help you understand Elastic Beanstalk and show you how to use it in your work.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Caution
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Elastic Beanstalk by Jurg van Vliet and Flavia Paganelli (OReilly). Copyright 2011 I-MO BV, 978-1-449-30664-9.
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .
Safari Books Online
Note
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
OReilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from OReilly and other publishers, sign up for free at http://my.safaribooksonline.com.