AWS Elastic Beanstalk - Amazon...

52
AWS Elastic Beanstalk User Guide API Version 2010-12-01

Transcript of AWS Elastic Beanstalk - Amazon...

Page 1: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

AWS Elastic BeanstalkUser Guide

API Version 2010-12-01

Page 2: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

AWS Elastic Beanstalk: User GuideCopyright © 2011 Amazon Web Services LLC or its affiliates. All rights reserved.

AWS Elastic Beanstalk User Guide

Page 3: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Table of ContentsWelcome ............................................................................................................................................................. 1AWS Elastic Beanstalk Concepts ....................................................................................................................... 2AWS Elastic Beanstalk Access .......................................................................................................................... 5

AWS Management Console ................................................................................................................... 5Amazon Toolkit for Eclipse ...................................................................................................................... 6AWS Elastic Beanstalk Command Line Interface ................................................................................... 6AWS Elastic Beanstalk API .................................................................................................................... 7

Using AWS Elastic Beanstalk Features .............................................................................................................. 8Creating New Application Versions ......................................................................................................... 8Launching New Environments .............................................................................................................. 10Monitoring Application Health ............................................................................................................... 13Events and Notifications ....................................................................................................................... 16Managing Your Application Environments ............................................................................................. 17

Configuring Servers .................................................................................................................... 18Configuring Elastic Load Balancing ............................................................................................ 20Configuring Auto Scaling ............................................................................................................. 22Configuring Databases ................................................................................................................ 24Configuring Notifications ............................................................................................................. 25Configuring Containers ............................................................................................................... 25

Listing and Connecting to Server Instances ......................................................................................... 27Working with Logs ................................................................................................................................ 29Terminating an Environment ................................................................................................................. 30Using Custom Environment Properties with AWS Elastic Beanstalk .................................................... 31Using Amazon RDS and MySQL Connector/J with AWS Elastic Beanstalk ......................................... 33Using Custom AMIs .............................................................................................................................. 34

Using the AWS Elastic Beanstalk APIs ............................................................................................................ 37Endpoints .............................................................................................................................................. 37Making Query Requests ....................................................................................................................... 38The Response Structure ....................................................................................................................... 41Available Libraries ................................................................................................................................. 42

Related AWS Elastic Beanstalk Resources ..................................................................................................... 43Document Conventions .................................................................................................................................... 46Document History ............................................................................................................................................. 49Glossary ........................................................................................................................................................... 45

AWS Elastic Beanstalk User Guide

Page 4: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Welcome

This is the AWS Elastic Beanstalk User Guide.This guide is designed for anyone who wants to use ElasticBeanstalk with the AWS Management Console. This guide provides you with the information to createand deploy your applications in the cloud using Elastic Beanstalk, and describes advanced servicefeatures.

AWS Elastic Beanstalk makes it easy for you to deploy and manage scalable, fault-tolerant applicationsrunning on Amazon Web Services cloud resources.

How Do I...?Relevant SectionsHow do I?

AWS Elastic Beanstalk Getting Started GuideGet started using AWS Elastic Beanstalk

AWS Elastic Beanstalk detail pageLearn if AWS Elastic Beanstalk is rightfor my use case

How AWS Elastic Beanstalk Works (p. 2)Learn about AWS Elastic Beanstalkconcepts

Creating New Application Versions (p. 8)Learn about creating new applicationversions

Launching New Environments (p. 10)Learn about creating new environments

Monitoring Application Health (p. 13)Learn about monitoring applicationhealth

API Version 2010-12-011

AWS Elastic Beanstalk User GuideHow Do I...?

Page 5: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

AWS Elastic Beanstalk Concepts

Topics

• How AWS Elastic Beanstalk Works (p. 2)

• AWS Elastic Beanstalk Components (p. 3)

• Design Considerations for AWS Elastic Beanstalk Applications (p. 4)

AWS Elastic Beanstalk enables you to quickly deploy and manage applications without worrying aboutthe infrastructure. With AWS Elastic Beanstalk, you can simply upload your application, and AWS ElasticBeanstalk automatically handles the deployment details of capacity provisioning, load balancing,auto-scaling, and application health monitoring.

How AWS Elastic Beanstalk WorksTo use AWS Elastic Beanstalk, simply upload an application version (for example, a Java WAR file) toAWS Elastic Beanstalk and provide some information about the application. AWS Elastic Beanstalkautomatically creates and configures the AWS resources needed to run your code; freeing you from thetask of manually configuring the server capacity, load balancing, and scaling required for your application.

When the application is created and deployed, information about the application—including metrics,events, and environment status—is available via the AWS Management Console, APIs, and CLI.

An AWS Elastic Beanstalk environment is at the heart of a running application. When you create anenvironment, AWS Elastic Beanstalk provisions the resources needed to run the application version youspecified. One of the things you must select when creating an environment is the container type. Acontainer type defines the infrastructure topology and software stack to be used for that environment.

API Version 2010-12-012

AWS Elastic Beanstalk User GuideHow AWS Elastic Beanstalk Works

Page 6: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Note

AWS Elastic Beanstalk currently supports Apache Tomcat 6 and Apache Tomcat 7.

Every environment has a CNAME (URL) that points to a load balancer. The load balancer sits in front ofone or more Amazon EC2 instances, which are part of an Auto Scaling group. Auto Scaling automaticallystarts additional Amazon EC2 instances (up to four) to accommodate increasing load on your application.If the load on your application decreases, Auto Scaling stops instances, but always leaves at least oneinstance running.

Each Amazon EC2 server instance that runs your application runs the Apache web server and Tomcatapplication server software on the Amazon Linux operating system. In addition, a software componentcalled the Host Manager (HM) runs on each Amazon EC2 server instance.The Host Manager is responsiblefor:

• Aggregating events and metrics for retrieval via the console, the API, or the command line

• Generating instance-level events

• Monitoring the application log files for critical errors

• Monitoring the application server

• Patching instance components

• Rotating your application's log files and publishing them to Amazon S3

The Host Manager reports metrics, errors and events, and server instance status, which are availablevia the AWS Management Console, APIs, and CLIs.

AWS Elastic Beanstalk ComponentsAWS Elastic Beanstalk is comprised of a number of important components that work together to enableyou to easily deploy and manage your application in the cloud.This section discusses those components.

ApplicationAn AWS Elastic Beanstalk application is a logical collection of AWS Elastic Beanstalk components,including environments, versions, and environment configurations. In AWS Elastic Beanstalk an applicationis conceptually similar to a folder.

VersionIn AWS Elastic Beanstalk, a version refers to a specific, labeled iteration of deployable code. A versionpoints to an Amazon S3 object that contains the deployable code (for example, a Java WAR file). Aversion is part of an application. Applications can have many versions.

EnvironmentAn environment is a version that is deployed onto AWS resources. An environment can have only oneversion at a time, but you can have multiple simultaneous environments that are running the same ordifferent versions.

AWS resources created for an environment include one elastic load balancer, an Auto Scaling group,and one or more Amazon EC2 instances. The software stack running on the Amazon EC2 instances is

API Version 2010-12-013

AWS Elastic Beanstalk User GuideAWS Elastic Beanstalk Components

Page 7: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

dependent on the container type. For example, the AWS Elastic Beanstalk for Tomcat 7 container usesthe Amazon Linux operating system, Apache web server, and Apache Tomcat software.

An environment includes a CNAME that points to a load balancer. The load balancer works with AutoScaling to provision Amazon EC2 instances that will run your web application.

Environment ConfigurationAn environment configuration identifies a collection of parameters and settings that define how anenvironment and its associated resources behave. When you update an environment’s configurationsettings, AWS Elastic Beanstalk automatically applies the changes to existing resources or deletes anddeploys new resources (depending on the type of change).

Configuration TemplateA configuration template is a starting points for creating unique environment configurations. Configurationtemplates can created or modified only by using the AWS Elastic Beanstalk command line utilities orAPIs.

Design Considerations for AWS ElasticBeanstalk Applications

Because applications deployed using AWS Elastic Beanstalk run on Amazon cloud resources, you shouldkeep two things in mind when designing your application: scalability and persistent storage.

ScalabilityAWS Elastic Beanstalk applications should be as stateless as possible, using loosely coupled fault-tolerantcomponents that can be scaled out as needed. For more information about designing scalable applicationarchitectures for AWS, go to Architecting for the Cloud: Best Practices.

Persistent StorageAWS Elastic Beanstalk applications run on Amazon EC2 instances that have no persistent local storage.When the Amazon EC2 instances terminate, the local file system is not saved, and new Amazon EC2instances start with a default file system.You should design your application to store data in a persistentdata source. Amazon Web Services offers a number of persistent storage options that you can leveragefor your application, including Amazon Simple Storage Service (Amazon S3), Amazon Elastic Block Store(Amazon EBS), Amazon SimpleDB, and Amazon Relational Database Service (Amazon RDS).

For a comprehensive list of technical AWS whitepapers, covering topics such as architecture, securityand economics, go to AWS Cloud Computing Whitepapers.

API Version 2010-12-014

AWS Elastic Beanstalk User GuideEnvironment Configuration

Page 8: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

AWS Elastic Beanstalk Access

Topics

• AWS Management Console (p. 5)

• Amazon Toolkit for Eclipse (p. 6)

• AWS Elastic Beanstalk Command Line Interface (p. 6)

• AWS Elastic Beanstalk API (p. 7)

You can create an application using one of four different AWS Elastic Beanstalk interfaces: the AWSElastic Beanstalk tab in the AWS Management Console, the AWS Elastic Beanstalk command line tools,the AWS Toolkit for Eclipse, or programmatically through the AWS Elastic Beanstalk web service APIs.

The simplest and quickest method is to use the AWS Elastic Beanstalk tab in the AWS ManagementConsole (console). This does not require any additional software or tools. The console is a web browserinterface for creating and managing your AWS Elastic Beanstalk applications.

The following sections contain overviews of each of the available AWS Elastic Beanstalk interfaces.

AWS Management ConsoleThe AWS Console enables you to manage applications through AWS Elastic Beanstalk from a singleinterface. The console provides access to all of your deployed applications and gives you the ability tomanage and monitor your applications and environments. From the console you can:

• Create and delete applications

• Add and delete application versions

• Create and delete environments

• Identify the running version within an environment

• View operational metrics

• View application and environment logs

The AWS Console is available at http://console.aws.amazon.com/elasticbeanstalk.

API Version 2010-12-015

AWS Elastic Beanstalk User GuideAWS Management Console

Page 9: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

For more information about getting started with AWS Elastic Beanstalk using the AWS Console, go tothe AWS Elastic Beanstalk Getting Started Guide.

Amazon Toolkit for EclipseThe Amazon Toolkit for Eclipse plug-in enables you to easily create new AWS Java Web projects thatare preconfigured with the AWS SDK for Java, and then deploy the web applications to AWS ElasticBeanstalk. The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform (WTP).

To ensure you have all the WTP dependencies, we recommend that you start with the Java EE distributionof Eclipse, which you can download from http://eclipse.org/downloads/.

In order to use the AWS Elastic Beanstalk features, you'll need to have an AWS account and be signedup for AWS Elastic Beanstalk. Instructions on how to sign up for AWS Elastic Beanstalk are in the AWSElastic Beanstalk Getting Started Guide. For more information on using the AWS Elastic Beanstalk plug-infor Eclipse, go to the AWS Toolkit for Eclipse web page.

AWS Elastic Beanstalk Command Line InterfaceAWS Elastic Beanstalk provides a command line interface (CLI) to access AWS Elastic Beanstalkfunctionality without using the AWS console or the APIs.

Setting up the Command Line ToolsThis section describes the prerequisites for running the command line tools, where to get the commandline tools, how to set up the tools and their environment, and includes a series of common examples oftool usage.

PrerequisitesThis document assumes you can work in a Linux/UNIX or Windows environment. The AWS ElasticBeanstalk command line tools also work correctly on Mac OS X (which resembles the Linux and UNIXcommand environment), but no specific Mac OS X instructions are included in this guide.

As a convention, all command line text is prefixed with a generic PROMPT> command line prompt. Theactual command line prompt on your machine is likely to be different. We also use $ to indicate aLinux/UNIX-specific command and C:\> for a Windows-specific command.The example output resultingfrom the command is shown immediately thereafter without any prefix.

Important

The command line tools used in this guide require Ruby version X or later to run. To view anddownload Ruby clients for a range of platforms, including Linux/UNIX and Windows, go tohttp://www.ruby-lang.org/en/.

Getting the Command Line ToolsThe command line tools are available as a ZIP file on the AWS Sample Code & Libraries website. Thesetools are written in Ruby, and include shell scripts for Windows 2000/XP/Vista, Linux/UNIX, and Mac OSX. The ZIP file is self-contained and no installation is required; simply download the ZIP file and unzip itto a directory on your local machine.

API Version 2010-12-016

AWS Elastic Beanstalk User GuideAmazon Toolkit for Eclipse

Page 10: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Providing Credentials for the ToolsThe command line tools need the Access Key ID and Secret Access Key provided with your AWS account.

You need to create a file containing your Access Key ID and Secret Access Key. The contents of the fileshould look like this:

AWSAccessKeyId=Write your AWS access IDAWSSecretKey=Write your AWS secret key

Important

On UNIX, limit permissions to the owner of the credential file:

$ chmod 600 <the file created above>

With the credentials file setup, you'll need to set the AWS_CREDENTIAL_FILE environment variable sothat the AWS Elastic Beanstalk tools can find your information.

To set the AWS_CREDENTIAL_FILE environment variable

• Set the environment variable using the following command:

On WindowsOn Linux and UNIX

C:\> set AWS_CREDENTIAL_FILE=<thefile created above>

$ export AWS_CREDENTIAL_FILE=<thefile created above>

AWS Elastic Beanstalk APIAWS Elastic Beanstalk provides a comprehensive API that enables you to programmatically access AWSElastic Beanstalk functionality. For more information on the AWS Elastic Beanstalk API, go to the AWSElastic Beanstalk API Reference.

API Version 2010-12-017

AWS Elastic Beanstalk User GuideAWS Elastic Beanstalk API

Page 11: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Using AWS Elastic BeanstalkFeatures

Topics

• Creating New Application Versions (p. 8)

• Launching New Environments (p. 10)

• Monitoring Application Health (p. 13)

• Events and Notifications (p. 16)

• Managing Your Application Environments (p. 17)

• Listing and Connecting to Server Instances (p. 27)

• Working with Logs (p. 29)

• Terminating an Environment (p. 30)

• Using Custom Environment Properties with AWS Elastic Beanstalk (p. 31)

• Using Amazon RDS and MySQL Connector/J with AWS Elastic Beanstalk (p. 33)

• Using Custom AMIs (p. 34)

This chapter discusses some of the most important features of AWS Elastic Beanstalk in detail, includingusage examples.

Creating New Application VersionsYou can create different versions for an application. Each application version consists of a unique WARfile, as well as contextual information about the version.

Note

For information on creating a new application, go to the AWS Elastic Beanstalk Getting StartedGuide.

To create a new application version

1. From the AWS Elastic Beanstalk tab on the AWS Console, select the application to which you wantto add a new version.

API Version 2010-12-018

AWS Elastic Beanstalk User GuideCreating New Application Versions

Page 12: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

2. Click the Upload New Version button.

The Upload New Version window appears.

3. Describe your application version details:

a. Enter a short descriptive name for the application version in the Version Label text box.

b. Enter a brief description of the application version in the Description text box.

c. In the Upload Existing Application text box, enter the location of the WAR file containing thenew application version.You can optionally click the Browse button to locate the WAR file inyour local file system.

Note

AWS Elastic Beanstalk supports only a single WAR file for an application version.

4. In the Deployment section of the Upload New Version dialog box, you can:

• Select Upload but do not deploy to any environment.

• Select Deploy to an existing environment after upload and select the environment from thedrop-down list box.

For this example, select Deploy to an existing environment after upload and select the DefaultEnvironment from the drop-down list box.

5. Click the Upload and Deploy New Version button.

The WAR file you specified is associated with your application and the application is launched withthe selected environment.

API Version 2010-12-019

AWS Elastic Beanstalk User Guide

Page 13: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Launching New EnvironmentsYou can deploy multiple environments when you need to run multiple versions of an application. Forexample, you might have development, integration, and production environments. When launched, youcan deploy a different version to any environment quickly and easily.

Important

After you create an environment, the environment URL is publicly visible.

To launch a new environment

1. On the AWS Elastic Beanstalk tab on the AWS Console, click the Launch New Environmentbutton.

The Launch New Environment wizard appears.

2. Describe your new environments details:

a. Enter a short descriptive name for the application version in the Environment Name text box.

This name is then auto-populated in the Environment URL text box.

b. If you want an environment URL that is different than the name of the environment, enter theURL in the Environment URL text box.

AWS Elastic Beanstalk will use this name to create a unique CNAME for the environment.

c. Enter a brief description of the environment in the Description text box.

d. In the Version section of the Launch New Environment dialog box, you can choose from twooptions:

• Click the Select an existing application version option and select the existing applicationversion from the drop-down list box.

• Click the Upload and use a new application version option and click Browse to choose afile to upload.

API Version 2010-12-0110

AWS Elastic Beanstalk User GuideLaunching New Environments

Page 14: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

e. Select a container type from the Container Type drop-down list box.

Note

After you launch a new environment with a container type, you cannot change thecontainer type. If you want to change the container type, you need to launch a newenvironment.

3. Click the Continue button to continue to the Configuration Details pane.

4. Provide configuration details about your environment.

a. Select an Amazon EC2 instance type.

The Instance Type drop-down list box displays the instance types available to your AWS ElasticBeanstalk environment. Select a server with the characteristics (including memory size and CPUpower) that are most appropriate to your application.

Note

AWS Elastic Beanstalk is free, but the AWS resources that it provisions might not be.For information on Amazon EC2 usage fees, go to Amazon EC2 Pricing.

For more information about the Amazon EC2 instance types available for your AWS ElasticBeanstalk environment, go to Instance Families and Types in the Amazon EC2 User Guide.

b. If you need to securely log in to your Amazon EC2 instances, provide an Amazon EC2 key pair.

You can securely log in to the Amazon EC2 instances provisioned for your AWS Elastic Beanstalkapplication with an Amazon EC2 key pair.

Important

You must create an Amazon EC2 key pair before you can use SSH to access your AWSElastic Beanstalk-provisioned Amazon EC2 instances.You can set up your Amazon

API Version 2010-12-0111

AWS Elastic Beanstalk User Guide

Page 15: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

EC2 key pairs using the AWS Console. For instructions on creating a key pair for AmazonEC2, see the Amazon EC2 Getting Started Guide.

The Existing Key Pair text box lets you specify the name of an Amazon EC2 key pair you useto securely log in to the Amazon EC2 instances running your AWS Elastic Beanstalk application.

For more information on Amazon EC2 Key Pairs, see Using Credentials in the Amazon EC2User Guide. For more information on connecting to Amazon EC2 instances, see Connecting toInstances and Connecting to an Instance from Windows using PuTTY in the Amazon EC2documentation.

c. If you want to receive email notifications of important events, provide an email address forAmazon Simple Notification Service (SNS) notifications.

AWS Elastic Beanstalk can notify you of important events regarding your application using theAmazon Simple Notification Service. To enable Amazon SNS notifications, simply enter youremail address in the Email Address text box.You can disable Amazon SNS notifications at alater time by editing the configuration of your running environment

d. If you want to override the default health check URL, provide a custom health check URL.

Elastic Load Balancing uses a health check to determine whether the Amazon EC2 instancesrunning your application are healthy. The health check determines an instance's health statusby probing a specified URL at a set interval; if the URL returns an error message, or fails torespond within a specified timeout period, the health check fails. AWS Elastic Beanstalk usesElastic Load Balancing health checks to set the status of your application in the AWS ElasticBeanstalk console.

The health check definition includes a URL to be queried for instance health. Override the defaultURL ("/") by entering the URL you want to check in the Application Health Check URL textbox.

5. Click the Continue button. The Review page appears.

6. Review your new environment settings and then click the Finish button.

The new environment is launched. Note that it can take several minutes for the new environment tostart while AWS Elastic Beanstalk is provisioning AWS resources.

API Version 2010-12-0112

AWS Elastic Beanstalk User Guide

Page 16: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Monitoring Application HealthKnowing that your application is available and responding to requests is important when running aproduction website.To assist with this, AWS Elastic Beanstalk performs a periodic health check on runningapplications and can be configured to notify you by e-mail of potential problems.

Understanding Environment HealthTo check application health status, every minute or two Elastic Beanstalk sends an HTTP HEAD requestto the application health check URL. By default, the application health check URL is the application root(for example http://myapp.elasticbeanstalk.com/), but you can change this value using the AWS Console.Elastic Beanstalk expects a response of 200 OK for the application to be considered healthy.

Elastic Beanstalk will change the environment health status to one of four color values depending on howthe application responds to the health check. The following table describes the color codes.

StatusColor

Your application is responding to the application health check URL within thelast minute.

Green

Your application hasn't responded to the application health check URL withinthe last five minutes.

Yellow

Your application hasn't responded to the application health check URL formore than five minutes. An environment is also considered red if ElasticBeanstalk detects other problems with the environment that are known tomake the application unavailable (e.g. the load balancer was deleted).

Red

Your application's health status is unknown; this status is reported when theapplication is not in the Ready state.

Gray

Any time the application health check URL fails to return a 200 OK response, Elastic Beanstalk performsa series of additional checks to try to determine the cause of the failure. These additional checks includethe following:

• Verifying that the load balancer still exists

• Verifying that the Auto Scaling group still exists

• Checking that there is at least one Amazon EC2 instance “In-Service” behind the load balancer

• Verifying that the Amazon EC2 security group is configured to allow ingress on Port 80

• Checking if the environment CNAME exists and is pointing to the right load balancer

• Checking to see if all Amazon EC2 instances are communicating

In addition to the environment-level health checking, Elastic Beanstalk also communicates with everyAmazon EC2 instance running as part of your Elastic Beanstalk application. Should any Amazon EC2instance fail to respond to ten consecutive health checks, Elastic Beanstalk will terminate the instanceas being unhealthy and Auto Scaling will start a new instance.

You can take several corrective actions if your application health changes to red:

• Look at environment events.You may find more information about the problem here.

• If you recently deployed a new version of the application, try rolling back to an older known workingversion.

API Version 2010-12-0113

AWS Elastic Beanstalk User GuideMonitoring Application Health

Page 17: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

• If you recently made configuration changes, try changing back to the former settings.

• If the problem appears to be with the environment, try the “Rebuild Environment” command.

• Try using Snapshot logs to view recent log file entries or log in to the Amazon EC2 instance andtroubleshoot directly.

Viewing Application Health and EnvironmentStatusYou can access operational information about your application from the AWS Console athttp://console.aws.amazon.com/elasticbeanstalk.

The AWS Console displays your environment's status and application health at a glance. A color-codedbox next to your application's name on the application overview window indicates your application status.

To monitor application health

1. Select your application from the drop-down list at the top of the AWS Elastic Beanstalk tab on theAWS Console.

2. In the AWS Elastic Beanstalk console window below the application selection drop-down list, clickthe Details for your application in the application's Environments list.

3. Click the Monitoring tab.

The Monitoring panel appears.

API Version 2010-12-0114

AWS Elastic Beanstalk User GuideViewing Application Health and Environment Status

Page 18: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

A set of graphs showing resource usage for this particular application environment is displayed.Youcan click on any of the graphs to bring up a window that displays more detailed information.

4. Click the Max Network In graph.

A detailed view of the Max Network In metric appears.

API Version 2010-12-0115

AWS Elastic Beanstalk User Guide

Page 19: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

You can use the drop-down lists at the top of the window to change your view of the selected metric.

Note

By default, only basic CloudWatch metrics are enabled, which return data in five-minuteperiods.You can enable more granular one-minute CloudWatch metrics by editing yourenvironment's configuration settings.

Events and NotificationsYou can use the AWS Console to access events and notifications associated with your application.

Viewing Events with the AWS ConsoleTo view application events

1. Select your application from the drop-down list at the top of the AWS Elastic Beanstalk tab on theAWS Console.

2. In the AWS Elastic Beanstalk console window below the application selection drop-down list, clickthe Application Details link.

3. Click the Events tab.

A list of the events for all environments for your application is displayed.You can filter the type ofevents displayed using the Viewing drop-down list box at the top of the list.

API Version 2010-12-0116

AWS Elastic Beanstalk User GuideEvents and Notifications

Page 20: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Viewing All Events with the Command LineYou can use the AWS Elastic Beanstalk command line tools to view all events for your application. In thisexample, we use the command line interface to get a list of all events for an application named 'My FirstElastic Beanstalk Application'.

To view all application events using the command line interface

• Enter the following command at a command prompt. $ elastic-beanstalk-describe-events-a "My First Elastic Beanstalk Application"

A list of all of the events for your application is displayed.

You can filter the events displayed using the filter parameters for the elastic-beanstalk-describe-eventscommand; enter elastic-beanstalk-describe-events --help from a command prompt for a list of availableparameters.

Managing Your Application EnvironmentsThe AWS Elastic Beanstalk console enables you to change how the AWS resources your applicationenvironments use are provisioned and configured.This section provides information on the specific servicesettings you can edit as part of your application environment configuration.

Changing Environment Configurations SettingsAWS Elastic Beanstalk configures a number of AWS cloud computing services when deploying yourapplication.You can edit how these individual services are configuring using the Edit Configurationwizard.

To edit an application's environment settings

API Version 2010-12-0117

AWS Elastic Beanstalk User GuideViewing All Events with the Command Line

Page 21: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

1. Select your application from the drop-down list at the top of the AWS Elastic Beanstalk tab on theAWS Console.

2. In the AWS Elastic Beanstalk tab below the application selection drop-down list, click the Actionsdrop-down list for your application environment in the application's Environments list and selectEdit Configuration.

The Edit Configuration window is displayed.

Configuring ServersAmazon EC2 is a web service that enables you to launch and manage server instances in Amazon's datacenters.You can use Amazon EC2 server instances at any time, for as long as you need, and for anylegal purpose. Instances are available in different sizes and configurations (for more information, go tothe Amazon EC2 product page).

You can edit the AWS Elastic Beanstalk environment's Amazon EC2 instance configuration with theSettings tab on the Edit Configuration dialog box in the AWS Console.

API Version 2010-12-0118

AWS Elastic Beanstalk User GuideConfiguring Servers

Page 22: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

EC2 Instance TypesThe EC2 Instance Type drop-down list box displays the instance types available to your AWS ElasticBeanstalk application. Changing the instance type enables you to select a server with the characteristics(including memory size and CPU power) that are most appropriate to your application.

Note

You cannot change between 32-bit and 64-bit instance types. For example, if your application isbuilt on a 32-bit platform, only 32-bit instance types appear in the list.

For more information about the Amazon EC2 instance types available for your AWS Elastic Beanstalkapplication, go to Instance Families and Types in the Amazon EC2 User Guide.

EC2 Security GroupsYou can control access to your AWS Elastic Beanstalk application using an EC2 Security Group. A securitygroup defines firewall rules for your instances. These rules specify which ingress (i.e., incoming) networktraffic should be delivered to your instance. All other ingress traffic will be discarded.You can modifyrules for a group at any time. The new rules are automatically enforced for all running instances andinstances launched in the future.

You can set up your EC2 security groups using the Amazon EC2 tab of the AWS Management Console.You can specify which Amazon EC2 Security Groups control access to your AWS Elastic Beanstalkapplication by entering the names of one or more Amazon EC2 security group names (delimited bycommas) into the EC2 Security Groups text box. For more information on Amazon EC2 Security Groups,see Using Security Groups in the Amazon EC2 User Guide.

EC2 Key PairsYou can securely log in to the Amazon EC2 instances provisioned for your AWS Elastic Beanstalkapplication with an Amazon EC2 key pair.

Important

You must create an Amazon EC2 key pair and configure your AWS Elastic Beanstalk-provisionedAmazon EC2 instances to use the Amazon EC2 key pair before you can use SSH to access yourAWS Elastic Beanstalk-provisioned Amazon EC2 instances.You can set up your Amazon EC2key pairs using the AWS Console. For instructions on creating a key pair for Amazon EC2, seethe Amazon EC2 Getting Started Guide.

The Existing Key Pair text box lets you specify the name of an Amazon EC2 key pair you use to securelylog in to the Amazon EC2 instances running your AWS Elastic Beanstalk application.

For more information on Amazon EC2 Key Pairs, see Using Credentials in the Amazon EC2 User Guide.For more information on connecting to Amazon EC2 instances, see Connecting to Instances andConnecting to an Instance from Windows using PuTTY in the Amazon EC2 documentation.

Monitoring IntervalBy default, only basic Amazon CloudWatch metrics are enabled, which return data in five-minute periods.You can enable more granular one-minute CloudWatch metrics by selecting 1 minute in the MonitoringInterval drop-down list box.

API Version 2010-12-0119

AWS Elastic Beanstalk User GuideConfiguring Servers

Page 23: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Note

Amazon CloudWatch service charges can apply for one-minute interval metrics. See the AmazonCloudWatch product page for more information.

Custom AMI IDYou can override the default AMI used for your Amazon EC2 instances with your own custom AMI byentering the identifier of your custom AMI into the Custom AMI ID text box.

Important

Using your own AMI is an advanced use case and should be done with care. If you need a customAMI, we recommend you start with the default AWS Elastic Beanstalk AMI, and then modify it.To be considered healthy, AWS Elastic Beanstalk expects Amazon EC2 instances to meet a setof requirements, including having a running Host Manager. If these requirements are not met,your environment might not work properly.

Configuring Elastic Load BalancingElastic Load Balancing is a web service that help you improve the availability and scalability of yourapplication.This service makes it easy for you to distribute application loads between two or more AmazonEC2 instances. Elastic Load Balancing enables availability through redundancy and supports traffic growthfor your application.

Elastic Load Balancing lets you automatically distribute and balance the incoming application traffic amongall the instances you are running. The service also makes it easy to add new instances when you needto increase the capacity of your application.

AWS Elastic Beanstalk automatically provisions Elastic Load Balancing when you deploy an application.You can modify your environment's Elastic Load Balancing configuration with the Load Balancing tabof the Edit Configuration wizard.

API Version 2010-12-0120

AWS Elastic Beanstalk User GuideConfiguring Elastic Load Balancing

Page 24: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

The following sections describe the Elastic Load Balancing parameters you can configure for yourapplication.

PortsThe load balancer provisioned to handle requests for your AWS Elastic Beanstalk application sendsrequests to the Amazon EC2 instances that are running your application.

You can specify the HTTP port by selecting a port from the HTTP Port drop-down list.You can also turnoff HTTP requests by selecting OFF from the drop-down list.

Elastic Load Balancing supports the HTTPS/TLS protocol to enable traffic encryption for the registeredAmazon EC2 instances to which traffic is being sent by the load balancer. To use the HTTPS support forElastic Load Balancing, you'll need to create and upload a certificate and key to the AWS Access andIdentity Management (IAM) service. The IAM service will store the certificate and provide an AmazonResource Name (ARN) for the SSL certificate you've uploaded. For more information creating anduploading certificates, see the Managing Server Certificates section of the AWS Identity and AccessManagement User Guide.

You can specify the HTTPS port by selecting a port from the HTTPS Port drop-down list.You can turnoff HTTPS requests by selecting OFF from the drop-down list. To use HTTPS with your AWS ElasticBeanstalk application, you must enter the ARN of your SSL certificate into the SSL Certificate ID textbox.

Health ChecksElastic Load Balancing uses a health check to determine whether the Amazon EC2 instances runningyour application are healthy. The health check determines an instance's health status by probing aspecified URL at a set interval; if the URL returns an error message, or fails to return within a specifiedtimeout period, the health check fails. AWS Elastic Beanstalk uses Elastic Load Balancing health checksto set the status of your application in the AWS Elastic Beanstalk console.

You can control the settings for the health check using the EC2 Instance Health Check section of theLoad Balancing panel.

The health check definition includes a URL to be queried for instance health. Override the default URLby entering it in the Application Health Check URL text box.

The following list describes the health check parameters you can set for your application.

API Version 2010-12-0121

AWS Elastic Beanstalk User GuideConfiguring Elastic Load Balancing

Page 25: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

• Enter the number of seconds in the Health Check Interval (seconds) text box to define the intervalat which Elastic Load Balancing will check the health of your application's Amazon EC2 instances.

• Specify the number of seconds Elastic Load Balancing will wait for a response before it considers theinstance non-responsive in the Health Check Timeout (seconds) text box.

• Specify the number of consecutive successful or unsuccessful URL probes before Elastic Load Balancingchanges the instance health status in the Healthy Check Count Threshold and Unhealthy CheckCount Threshold text boxes. For example, specifying 5 in the Unhealthy Check Count Thresholdtext box means that the URL would have to return an error message or timeout five consecutive timesbefore Elastic Load Balancing considers the health check "failed."

SessionsBy default a load balancer routes each request independently to the server instance with the smallestload. By comparison, a sticky session binds a user's session to a specific server instance so that allrequests coming from the user during the session will be sent to the same server instance.

AWS Elastic Beanstalk uses load balancer-generated HTTP cookies when sticky sessions are enabledfor an application.The load balancer uses a special load balancer-generated cookie to track the applicationinstance for each request. When the load balancer receives a request, it first checks to see if this cookieis present in the request. If so, the request is sent to the application instance specified in the cookie. Ifthere is no cookie, the load balancer chooses an application instance based on the existing load balancingalgorithm. A cookie is inserted into the response for binding subsequent requests from the same user tothat application instance. The policy configuration defines a cookie expiry, which establishes the durationof validity for each cookie.

You can use the Sessions section on the Load Balancer tab to specify whether or not the load balancerfor your application allows session stickiness.

For more information on Elastic Load Balancing, go to the Elastic Load Balancing Developer Guide.

Configuring Auto ScalingAuto Scaling is a web service designed to automatically launch or terminate Amazon EC2 instancesbased on user-defined triggers. Users can set up Auto Scaling groups and associate triggers with thesegroups to automatically scale computing resources based on metrics such as bandwidth usage or CPUutilization. Auto Scaling works with Amazon CloudWatch to retrieve metrics for the server instancesrunning your application.

Auto Scaling lets you take a group of Amazon EC2 instances and set various parameters to have thisgroup automatically increase or decrease in number. Auto Scaling can add or remove Amazon EC2instances from that group to help you seamlessly deal with traffic changes to your application.

Auto Scaling also monitors the health of each Amazon EC2 instance that it launches. If any instanceterminates unexpectedly, Auto Scaling detects the termination and launches a replacement instance.This capability enables you to maintain a fixed, desired number of Amazon EC2 instances automatically.

API Version 2010-12-0122

AWS Elastic Beanstalk User GuideConfiguring Auto Scaling

Page 26: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

AWS Elastic Beanstalk provisions Auto Scaling for your application.You can configure how Auto Scalingbehaves by clicking the Auto Scaling tab on the Edit Configuration window.

The following section discusses how to configure Auto Scaling parameters for your application.

Launch ConfigurationYou can edit the launch configuration to control how your AWS Elastic Beanstalk application provisionsAuto Scaling resources.

The Minimum Instance Count and Maximum Instance Count text boxes let you specify the minimumand maximum size of the Auto Scaling group that your AWS Elastic Beanstalk application uses.

Note

To maintain a fixed number of Amazon EC2 instances, set the Minimum Instance Count andMaximum Instance Count text boxes to the same value.

The Availability Zones text box lets you specify the number of Availability Zones you want your AmazonEC2 instances to be in. It is important to set this number if you want to build fault-tolerant applications. Ifone Availability Zone goes down, your instances will still be running in your other Availability Zones.

API Version 2010-12-0123

AWS Elastic Beanstalk User GuideConfiguring Auto Scaling

Page 27: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Note

Currently it is not possible to specify which Availability Zone your instance will be in.

TriggersA trigger is an Auto Scaling mechanism that you set to tell the system when you want to increase (scaleout) the number of instances, and when you want to decrease (scale in) the number of instances.Youcan configure triggers to fire on any metric published to Amazon CloudWatch, such as CPU utilization,and determine if the conditions you specified have been met. When the upper or lower thresholds of theconditions you have specified for the metric have been breached for the specified period of time, thetrigger launches a long-running process called a Scaling Activity.

You can define a scaling trigger for your AWS Elastic Beanstalk application using the AWS Console.

Auto Scaling triggers work by watching a specific Amazon CloudWatch metric for an instance. Triggersinclude CPU utilization, network traffic, and disk activity. Use the Trigger Statistic drop-down list box toselect a metric for your trigger.

The following list describes the trigger parameters you can configure using the AWS Console.

• You can use specify which statistic the trigger should use.You can select Minimum, Maximum, Sum,or Average using the Trigger Measurement drop-down list.

• Specify the unit for the trigger measurement using the Unit of Measurement drop-down list.

• The value in the Measurement Period text box specifies how frequently Amazon CloudWatch measuresthe metrics for your trigger. The Breach Duration is the amount of time a metric can be beyond itsdefined limit (as specified in the Upper Threshold and Lower Threshold text boxes) before the triggerfires.

• The Upper Breach Scale Increment and Lower Breach Scale Increment text boxes specify howmany Amazon EC2 instances to add or remove when performing a scaling activity.

For more information on Auto Scaling, go to the Auto Scaling documentation.

Configuring DatabasesAWS Elastic Beanstalk applications run on Amazon EC2 instances that have no persistent local storage.Amazon Web Services offers a number of persistent storage options that you can leverage for yourapplication. For more information on AWS storage options, go to Storage Options in the AWS Cloud.

API Version 2010-12-0124

AWS Elastic Beanstalk User GuideConfiguring Databases

Page 28: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Configuring NotificationsAWS Elastic Beanstalk can notify you of important events regarding your application using the AmazonSimple Notification Service. To enable Amazon SNS notifications, simply enter your email address in theE-mail Address text box. To disable Amazon SNS notifications, remove your email address from thetext box.

Configuring ContainersThe Container/JVM Options panel lets you fine-tune the behavior of the Java Virtual Machine on yourAmazon EC2 instances and enable or disable Amazon S3 log rotation.

JVM OptionsThe JVM heap size affects how many objects can be created in memory before garbage collection—aprocess of cleaning and reorganizing memory—occurs.You can specify an initial heap size and a maximumheap size. A larger initial heap size allows more objects to be created before garbage collection occurs,but also means that the garbage collector will take longer to compact the heap. The maximum heap sizespecifies the maximum amount of memory the JVM can allocate when expanding the heap during heavyactivity.

API Version 2010-12-0125

AWS Elastic Beanstalk User GuideConfiguring Notifications

Page 29: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

You can set the initial and the maximum JVM heap sizes using the Initial Java Heap Size (MB) andMaximum Java Heap Size (MB) text boxes.

The permanent generation is a section of the JVM heap that is used to store class definitions andassociated metadata.You can modify the size of the permanent generation by entering a value in theMaximum JVM Permanent Generation Size (MB) text box.

Full documentation of JVM is beyond the scope of this guide; for more information on JVM garbagecollection, go to Tuning Garbage Collection with the 1.4.2 Java Virtual Machine.

Amazon S3 Log RotationAWS Elastic Beanstalk can copy the log files for your application's Amazon EC2 instances to the AmazonS3 bucket associated with your application on an hourly basis. To enable this feature, select the Enablelog file rotation to Amazon S3 check box.

Environment PropertiesThis section of the Container panel lets you specify environment variables (such as connection stringsand database options) on the Amazon EC2 instances that are running your application. This settingenables greater portability by eliminating the need to recompile your source code as you move betweenenvironments.

You can use this window to configure the following environment properties:

• Specify AWS credentials using the AWS_ACCESS_KEY_ID and AWS_SECRET_KEY text boxes.

• Specify a connection string to an external database (such as Amazon RDS) by entering it in theJDBC_CONNECTION_STRING text box.

• Specify up to five additional environment variables by entering them in the PARAM text boxes.

API Version 2010-12-0126

AWS Elastic Beanstalk User GuideConfiguring Containers

Page 30: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Listing and Connecting to Server InstancesYou can view a list of Amazon EC2 instances running your AWS Elastic Beanstalk application environmentthrough the AWS Console console.You can connect to these instances using any SSH client.

Important

You must create an Amazon EC2 key pair and configure your AWS Elastic Beanstalk-provisionedAmazon EC2 instances to use the Amazon EC2 key pair before you can use SSH to access yourAWS Elastic Beanstalk-provisioned Amazon EC2 instances.You can set up your Amazon EC2key pairs using the AWS Console. For instructions on creating a key pair for Amazon EC2, seethe Amazon EC2 Getting Started Guide. For more information on how to configure your AmazonEC2 instances to use an Amazon EC2 key pair, go to EC2 Key Pairs (p. 19).

To view and connect to Amazon EC2 instances for an environment

1. Go to the Amazon EC2 tab on the AWS Console:

a. Go to the AWS Management Console web page.

b. Select Amazon EC2 from the drop-down list under the Sign in to the AWS Console button,and then click the Sign in to the AWS Console button.

2. Click the Load Balancers link in the Navigation list on the left side of the console window.

3. Load balancers created by AWS Elastic Beanstalk will have a awseb- prefix in the name, followedby the name of your application. Find the load balancer for your application and click it.

In this example, we will click the awseb-Default-Environment load balancer.

API Version 2010-12-0127

AWS Elastic Beanstalk User GuideListing and Connecting to Server Instances

Page 31: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

4. Click the Instances tab in the bottom pane of the console window.

A list of the instances that the load balancer for your AWS Elastic Beanstalk environment uses isdisplayed. Make a note of an instance ID that you'd like to connect to.

5. Click the Instances link in the Navigation panel.

6. Right-click the instance ID for the Amazon EC2 instance running in your application's load balancerin the My Instances list and select Connect from the context menu.

API Version 2010-12-0128

AWS Elastic Beanstalk User Guide

Page 32: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

7. Make a note of the instance's public DNS address.

8. Use the SSH client of your choice to connect to your instance.

For more information on connecting to an Amazon EC2 instance, see the Amazon EC2 Getting StartedGuide.

Working with LogsYou can configure your environment so that the logs from the Amazon EC2 instances running yourapplications are copied by AWS Elastic Beanstalk to the Amazon S3 bucket associated with yourapplication.You can then view these logs from the AWS Elastic Beanstalk console.

To take a snapshot and view logs

1. From the AWS Elastic Beanstalk tab on the AWS Console, navigate to the logs for your application:

a. Select your application from the drop-down list at the top.

b. Below the application selection drop-down list, click the Details for your application in theapplication's Environments list.

c. Click the Logs tab.

The Logs panel appears.

2. Click the Snapshot Logs button.This action takes a snapshot of the logs for your AWS Elastic Beanstalk application. The log fileappears in the Logs panel.

Note

It takes several seconds to retrieve the log files.You may need to click the Refresh buttonto see the contents of the log files.

API Version 2010-12-0129

AWS Elastic Beanstalk User GuideWorking with Logs

Page 33: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

3. Click the View Log File link.

A web page displaying the text output of the log file snapshot opens.

You can also access your server instance using an SSH client and view your log files directly. For moreinformation about accessing your server instance, go to Listing and Connecting to Server Instances (p. 27).

Terminating an EnvironmentYou can terminate a running environment using the AWS Elastic Beanstalk console to avoid incurringcharges for unused AWS resources.

Note

You can always launch a new environment using the same version later.

To terminate an environment

1. Select your application from the drop-down list at the top of the AWS Elastic Beanstalk tab.

2. In the AWS Elastic Beanstalk tab below the application selection drop-down list, click the Details foryour application in the application's Environments list.

3. Click the Actions button at the top-right side of the window and select Terminate this Environmentfrom the drop-down menu.

API Version 2010-12-0130

AWS Elastic Beanstalk User GuideTerminating an Environment

Page 34: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

A dialog box appears, enabling you to confirm that you want to terminate the environment.

Note

When you terminate your environment, the CNAME associated with the terminatedenvironment becomes available for anyone to use.

4. Click Terminate Environment to confirm termination of the environment.

Using Custom Environment Properties with AWSElastic Beanstalk

You can use the AWS Console to set environment properties that AWS Elastic Beanstalk passes to yourserver instances. These environment variables are passed as system properties on the Java VirtualMachine (JVM), and can be used to pass database connection strings, security credentials, or other usefulinformation to your application without having to hard-code that information into your application. Storingthis information outside of your application can help increase the portability and scalability of yourapplication.

The following example sets the JDBC_CONNECTION_STRING and PARAM1 environment properties in theAWS Console.

To set environment properties for your AWS Elastic Beanstalk application

1. Select your application from the drop-down list at the top of the AWS Elastic Beanstalk tab on theAWS Console.

2. In the AWS Elastic Beanstalk tab below the application selection drop-down list, click the Actionsdrop-down list for your application environment in the application's Environments list and selectEdit Configuration.

API Version 2010-12-0131

AWS Elastic Beanstalk User GuideUsing Custom Environment Properties with AWS Elastic

Beanstalk

Page 35: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

The Edit Configuration window appears.

3. Click the Container tab.

4. Scroll down in the Container tab until the Environment Properties section appears.

5. In the JDBC_CONNECTION_STRING text box, type a connection string. For example, the followingJDBC connection string would connect to a MySQL database instance on port 3306 of localhost,with a username of "me" and a password of "mypassword":

jdbc:mysql://localhost:3306/mydatabase?user=me&password=mypassword

This will be accessible to your AWS Elastic Beanstalk application via a system property calledJDBC_CONNECTION_STRING.

6. In the PARAM1 text box, enter a string. For example:

My test parameter.

This will be accessible to your AWS Elastic Beanstalk application via an system property calledPARAM1.

7. Click the Apply Changes button.

AWS Elastic Beanstalk will update your environment. This may take several minutes.

API Version 2010-12-0132

AWS Elastic Beanstalk User Guide

Page 36: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Accessing Custom Environment Properties fromYour AWS Elastic Beanstalk ApplicationAfter you set your environment properties using the AWS Console, you can access the environmentproperties from your code. For example, the following code snippet shows how to access the AWS ElasticBeanstalk environment properties using JavaScript in a JavaServer Page (JSP):

<p> The JDBC_CONNECTION_STRING environment variable is: <%= System.getProperty("JDBC_CONNECTION_STRING") %></p>

<p> The PARAM1 environment variable is: <%= System.getProperty("PARAM1") %> </p>

Using Amazon RDS and MySQL Connector/Jwith AWS Elastic Beanstalk

Amazon Relational Database Service (Amazon RDS) enables you to quickly and easily provision andmaintain a MySQL Server instance in the cloud.This topic discusses how you can use Amazon RDS andthe MySQL Connector/J with your AWS Elastic Beanstalk application.

Note

For more information on AWS storage options, go to Storage Options in the AWS Cloud.

To use Amazon RDS from your AWS Elastic Beanstalk application, you will need to do the following:

• Create an Amazon RDS DB Instance.

• Configure your Amazon RDS DB Security Group to allow access from the Amazon EC2 security groupused by your AWS Elastic Beanstalk application.

• Create a JDBC connection string using your Amazon RDS DB Instance's public DNS name and configureyour AWS Elastic Beanstalk environment to pass the string to your AWS Elastic Beanstalk applicationas an environment variable.

• Download and install MySQL Connector/J.

• Retrieve the JDBC connection string from the environment property passed to your server instancefrom AWS Elastic Beanstalk and use MySQL Connector/J to access your Amazon RDS database.

To use Amazon RDS with MySQL Connector/J from your AWS Elastic Beanstalk Application

1. Create an Amazon RDS DB Instance. For instructions on how to do this, go to the Amazon RDSGetting Started Guide.

2. Configure your Amazon RDS DB Security Group to allow access from the Amazon EC2 securitygroup used by your AWS Elastic Beanstalk application (the default security group for AWS ElasticBeanstalk applications is elastic-beanstalk). For more information, go to the Authorizing Network

API Version 2010-12-0133

AWS Elastic Beanstalk User GuideAccessing Custom Environment Properties from Your

AWS Elastic Beanstalk Application

Page 37: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Access to an Amazon EC2 Security Group section of Working with DB Security Groups in the AmazonRDS User Guide.

3. Download and install MySQL Connector/J for your development environment. For download andinstallation instructions, go to http://dev.mysql.com/downloads/connector/j.

4. Create a JDBC connection string using your Amazon RDS DB Instance's public DNS name, portnumber, and (optionally) database name and login credentials.The following example shows a JDBCconnection string that would connect to the employees database on an RDS instance atmydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com using port 3306, with the user name "sa"and the password "mypassword".

jdbc:mysql://mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com:3306/em ployees?user=sa&password=mypassword

5. Configure your AWS Elastic Beanstalk environment to pass the string to your AWS Elastic Beanstalkapplication as an environment property. For instructions on how to do this, go to Using CustomEnvironment Properties with AWS Elastic Beanstalk (p. 31).

6. Retrieve the JDBC connection string from the environment property passed to your server instancefrom AWS Elastic Beanstalk and use MySQL Connector/J to access your Amazon RDS database.The following code example shows how to retrieve the JDBC_CONNECTION_STRING customenvironment property from a Java Server Page (JSP):

<p> The JDBC_CONNECTION_STRING environment variable is: <%= System.getProperty("JDBC_CONNECTION_STRING") %></p>

For more information on getting started using the MySQL Connector/J to access your MySQLdatabase, go to http://dev.mysql.com/doc/refman/5.0/en/connector-j.html.

7. Copy the MySQL Connector/J JAR file into your AWS Elastic Beanstalk application's WEB-INF/libdirectory.

8. Deploy your application to AWS Elastic Beanstalk. For information on how to deploy your applicationusing AWS Elastic Beanstalk and the AWS Console, go to the AWS Elastic Beanstalk Getting StartedGuide. For information on how to deploy your application using Eclipse, go to Getting Started withEclipse and AWS Elastic Beanstalk.

Using Custom AMIsYou can customize the default Amazon Machine Image (AMI) that AWS Elastic Beanstalk uses for yourapplications.You can do this by customizing the existing AWS Elastic Beanstalk AMI. This sectiondescribes how to create and use a customized Amazon Machine Image (AMI) for use with AWS ElasticBeanstalk.

Important

Once you are running on your own custom AMI, you will no longer receive any automated updatesto the operating system, software stack, or the AWS Elastic Beanstalk host manager.

To create and use a customized AMI

API Version 2010-12-0134

AWS Elastic Beanstalk User GuideUsing Custom AMIs

Page 38: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

1. Log into the AWS Management Console and click the AWS Elastic Beanstalk tab.

2. Launch your AWS Elastic Beanstalk application. For more information on how to launch an AWSElastic Beanstalk application, go to the AWS Elastic Beanstalk Getting Started Guide.

3. Find the AMI ID used by AWS Elastic Beanstalk to launch your application. This information can beviewed in the AWS Elastic Beanstalk Edit Configuration dialog.

4. Use the Amazon EC2 tab of the AWS Management Console to launch an instance using that AMIID:

a. Click on the Amazon EC2 tab.

b. Click the Launch Instance button. The Request Instances Wizard appears.

c. Click the My AMIs tab.

d. Select "All Images" from the Viewing drop-down list box.

e. Enter the AMI ID that AWS Elastic Beanstalk used to launch your application in the text box tothe right of the Viewing drop-down listbox and wait for the AMI to appear in the list.

f. Click the Select button next to the AMI in the list to continue.

g. Continue using the Amazon EC2 Request Instances Wizard to launch the AWS Elastic BeanstalkAMI that you want to customize.

Note

When launching the instance using the AWS Console, make sure you create or specifya key pair, and that you select at least the "elasticbeanstalk-default" security group.

For additional information on how to launch an Amazon EC2 instance, go to Running an Instancein the Amazon EC2 User Guide.

5. Connect to the instance using the SSH client of your choice. For more information on connecting toan Amazon EC2 instance, go to Connecting to Instances in the Amazon EC2 User Guide.

Important

You must leave the AWS Elastic Beanstalk host manager running on your instance. Onceyou are running on your own custom AMI, you will no longer receive any automated updatesto the operating system, software stack, or the AWS Elastic Beanstalk host manager.

6. Perform your customizations.

API Version 2010-12-0135

AWS Elastic Beanstalk User GuideUsing Custom AMIs

Page 39: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

• Apache and Tomcat are not automatically started when you manually launch the AWS ElasticBeanstalk AMI using the Amazon EC2 tab on the AWS Console. Enter the following commandsat your Amazon EC2 instance's command prompt to start Apache and Tomcat.

sudo -scd /etc/init.d./httpd start./tomcat7 start

7. From the Amazon EC2 tab on the AWS Management Console, select the running instance thatyou've just modified and select Create Image (EBS AMI) from the Instance Actions menu. Formore information on how to create an image from a running instance, go to Creating an Image froma Running Instance.

8. To avoid incurring additional AWS charges, terminate the Amazon EC2 instance you used to createthe AMI.

9. To use your custom AMI, specify your custom AMI ID in the Custom AMI ID text box in the AWSElastic Beanstalk Edit Configuration dialog box.

API Version 2010-12-0136

AWS Elastic Beanstalk User GuideUsing Custom AMIs

Page 40: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Using the AWS Elastic BeanstalkAPIs

Topics

• Required Knowledge (p. 37)

• Endpoints (p. 37)

• Making Query Requests (p. 38)

• The Response Structure (p. 41)

• Available Libraries (p. 42)

This section provides an overview of using the SOAP and Query APIs.

Required KnowledgeIf you plan to access AWS Elastic Beanstalk through its API, we assume you're familiar with the following:

• XML (For an overview, go to the W3 Schools XML Tutorial )

• Web services (go to W3 Schools Web Services Tutorial )

• HTTP requests

• One or more programming languages

EndpointsAWS Elastic Beanstalk; supports the following region-specific endpoints:

EndpointRegion

elasticbeanstalk.us-east-1.amazonaws.comUS-East (Northern Virginia) Region

API Version 2010-12-0137

AWS Elastic Beanstalk User GuideRequired Knowledge

Page 41: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Making Query RequestsTopics

• Endpoints (p. 38)

• Structure of a GET Request (p. 38)

• Query Parameters (p. 39)

• Query API Authentication (p. 39)

Query requests are HTTP or HTTPS requests that use the HTTP verb GET or POST and a Queryparameter named Action.

EndpointsAWS Elastic Beanstalk supports the following region-specific endpoints:

EndpointRegion

elasticbeanstalk.us-east-1.amazonaws.comUS-East (Northern Virginia) Region

Structure of a GET RequestThis guide presents the AWS Elastic Beanstalk GET requests as URLs, which you can use directly in abrowser. The URL consists of:

• Endpoint—The web service entry point to act on (e.g., elasticbeanstalk.amazonaws.com, which defaultsto the us-east-1 Region)

• Action—The action you want to perform on the endpoint; for example: running an instance(RunInstance)

• Parameters—Any request parameters

The following is an example GET request.

https://elasticbeanstalk.us-east-1.amazon.com/?ApplicationName=SampleApp &IncludeDeleted=true &IncludedDeletedBackTo=2008-11-05T06%3A00%3A00Z &Operation=DescribeEnvironments &AuthParams

Important

Because the GET requests are URLs, you must URL-encode the parameter values. In the AWSElastic Beanstalk documentation, we leave the example GET requests unencoded to make themeasier to read.

To make the GET examples even easier to read, this guide presents them in the following parsed format.

https://elasticbeanstalk.amazonaws.com/?Action=DescribeEnvironments

API Version 2010-12-0138

AWS Elastic Beanstalk User GuideMaking Query Requests

Page 42: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

&ApplicationName=SampleApp&IncludeDeleted=true&IncludedDeletedBackTo=2008-11-05T06%3A00%3A00Z&AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE&Version=2010-12-01&Expires=2010-10-10T12:00:00Z&Signature=lBP67vCvGlDMBQ1dofZxg8E8SUEXAMPLE&SignatureVersion=2&SignatureMethod=HmacSHA256

The first line represents the endpoint of the request. After the endpoint is a question mark (?), whichseparates the endpoint from the parameters. Each parameter is separated by an ampersand (&).

The Action parameter indicates the action to perform (for a list of the actions, go to AWS Elastic BeanstalkAPI Reference.

Note

In the example Query requests we present in the AWS Elastic Beanstalk documentation, we omitthe parameters related to authentication to make it easier to focus on the ones relevant to theparticular operation. We replace them with the following literal string to remind you that a realrequest includes the parameters: &AuthParams.

Query ParametersEach Query request must include some common parameters to handle authentication and selection ofan action. For more information, go to the AWS Elastic Beanstalk API Reference.

Some operations take lists of parameters. These lists are specified using the param.n notation. Valuesof n are integers starting from 1.

Query API AuthenticationYou can send Query requests over either HTTP or HTTPS. Regardless of which protocol you use, youmust include a signature in every Query request. This section describes how to create the signature. Themethod described in the following procedure is known as signature version 2.

Caution

If you are currently using signature version 1: Version 1 is deprecated, and you should move tosignature version 2 immediately. For information about the deprecation schedule and thedifferences between signature version 2 and version 1, go to Making Secure Requests to AmazonWeb Services.

To create the signature

1. Create the canonicalized query string that you need later in this procedure:

a. Sort the UTF-8 query string components by parameter name with natural byte ordering.The parameters can come from the GET URI or from the POST body (when Content-Type isapplication/x-www-form-urlencoded).

b. URL encode the parameter name and values according to the following rules:

• Do not URL encode any of the unreserved characters that RFC 3986 defines.

API Version 2010-12-0139

AWS Elastic Beanstalk User GuideQuery Parameters

Page 43: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

These unreserved characters are A-Z, a-z, 0-9, hyphen ( - ), underscore ( _ ), period ( . ), andtilde ( ~ ).

• Percent encode all other characters with %XY, where X and Y are hex characters 0-9 anduppercase A-F.

• Percent encode extended UTF-8 characters in the form %XY%ZA....

• Percent encode the space character as %20 (and not +, as common encoding schemes do).

Note

Currently all AWS service parameter names use unreserved characters, so you don'tneed to encode them. However, you might want to include code to handle parameternames that use reserved characters, for possible future use.

c. Separate the encoded parameter names from their encoded values with the equals sign ( = )(ASCII character 61), even if the parameter value is empty.

d. Separate the name-value pairs with an ampersand ( & ) (ASCII code 38).

2. Create the string to sign according to the following pseudo-grammar (the "\n" represents an ASCIInewline).

StringToSign = HTTPVerb + "\n" + ValueOfHostHeaderInLowercase + "\n" + HTTPRequestURI + "\n" + CanonicalizedQueryString <from the preceding step>

The HTTPRequestURI component is the HTTP absolute path component of the URI up to, but notincluding, the query string. If the HTTPRequestURI is empty, use a forward slash ( / ).

3. Calculate an RFC 2104-compliant HMAC with the string you just created, your Secret Access Keyas the key, and SHA256 or SHA1 as the hash algorithm.For more information, go to http://www.ietf.org/rfc/rfc2104.txt.

4. Convert the resulting value to base64.

5. Use the resulting value as the value of the Signature request parameter.

Important

The final signature you send in the request must be URL encoded as specified in RFC 3986 (formore information, go to http://www.ietf.org/rfc/rfc3986.txt. If your toolkit URL encodes your finalrequest, then it handles the required URL encoding of the signature. If your toolkit doesn't URLencode the final request, then make sure to URL encode the signature before you include it inthe request. Most importantly, make sure the signature is URL encoded only once. A commonmistake is to URL encode it manually during signature formation, and then again when the toolkitURL encodes the entire request.

API Version 2010-12-0140

AWS Elastic Beanstalk User GuideQuery API Authentication

Page 44: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Example DescribeImages Request

https://elasticbeanstalk.amazonaws.com/?Action=DescribeEnvironments&ApplicationName=SampleApp&IncludeDeleted=true&IncludedDeletedBackTo=2011-01-01T06%3A00%3A00Z&Version=2010-12-01&Expires=2011-01-18T12%3A00%3A00Z&SignatureVersion=2&SignatureMethod=HmacSHA256&AWSAccessKeyId=<Your AWS Access Key ID>

Following is the string to sign.

GET\nelasticbeanstalk.amazonaws.com\n/\nAWSAccessKeyId=<Your AWS Access Key ID>&Action=DescribeEnvironments&Expires=2011-01-18T12%3A00%3A00Z&ApplicationName=SampleApp&IncludeDeleted=true&IncludedDeletedBackTo=2011-01-01T06%3A00%3A00Z&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2010-12-01

Following is the signed request.

https://elasticbeanstalk.amazonaws.com/?Action=DescribeEnvironments&ApplicationName=SampleApp&IncludeDeleted=true&IncludedDeletedBackTo=2011-01-01T06%3A00%3A00Z&Version=2010-12-01&Expires=2011-01-18T12%3A00%3A00Z&Signature=<URLEncode(Base64Encode(Signature))>&SignatureVersion=2&SignatureMethod=HmacSHA256&AWSAccessKeyId=<Your AWS Access Key ID>

The Response StructureIn response to either a Query or SOAP request, the service returns an XML data structure that conformsto an XML schema defined as part of the AWS Elastic Beanstalk WSDL.The structure of an XML responseis specific to the associated request. In general, the response data types are named according to theoperation performed and whether the data type is a container (can have children). Examples of containersinclude groupSet for security groups and keySet for key pairs (see the example that follows). Itemelements are children of containers, and their contents vary according to the container's role.

API Version 2010-12-0141

AWS Elastic Beanstalk User GuideThe Response Structure

Page 45: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Every AWS Elastic Beanstalk response includes a request ID in a requestId element. The value is aunique string that AWS assigns. If you ever have issues with a particular request, AWS will ask for therequest ID to help troubleshoot the issue. The following shows an example response.

<DescribeKeyPairsResponse xmlns="http://ec2.amazonaws.com/doc/2010-12-01/"> <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId> <keySet> <item> <keyName>gsg-keypair</keyName> <keyFinger print>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFinger print> </item> </keySet></DescribeKeyPairsResponse>

Available LibrariesAWS provides libraries, sample code, tutorials, and other resources for software developers who preferto build applications using language-specific APIs instead of SOAP and Query. These libraries providebasic functions (not included in the APIs), such as request authentication, request retries, and errorhandling so that it is easier to get started. Libraries and resources are available for the following languages:

• Java

• PHP

• Python

• Ruby

• Windows and .NET

For libraries and sample code in all languages, go to Sample Code & Libraries.

API Version 2010-12-0142

AWS Elastic Beanstalk User GuideAvailable Libraries

Page 46: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Related AWS Elastic BeanstalkResources

The following table lists related resources that you'll find useful as you work with this service.

DescriptionResource

Provides a quick tutorial of the service based on a simple usecase. Examples and instructions are included.

AWS Elastic Beanstalk Getting StartedGuide

Provides conceptual information about AWS Elastic Beanstalkand describes how to use AWS Elastic Beanstalk featuresusing the AWS Management Console and command linetools.

AWS Elastic Beanstalk User Guide

Contains a comprehensive description of all SOAP and QueryAPIs. Additionally, it contains a list of all SOAP data types.

AWS Elastic Beanstalk API Reference

Covers the top questions developers have asked about thisproduct.

AWS Elastic Beanstalk Technical FAQ

Provides a high-level overview of the current release. Theyspecifically note any new features, corrections, and knownissues.

AWS Elastic Beanstalk Release Notes

A central starting point to find documentation, code samples,release notes, and other information to help you buildinnovative applications with AWS.

AWS Developer Resource Center

The console enables you to use most of the functions of AWSElastic Beanstalk and other AWS products withoutprogramming.

AWS Management Console

A community-based forum for developers to discuss technicalquestions related to Amazon Web Services.

Discussion Forums

The home page for AWS Technical Support, including accessto our Developer Forums, Technical FAQs, Service Statuspage, and AWS Premium Support (if you are subscribed tothis program).

AWS Support Center

API Version 2010-12-0143

AWS Elastic Beanstalk User Guide

Page 47: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

DescriptionResource

The primary web page for information about AWS PremiumSupport, a one-on-one, fast-response support channel to helpyou build and run applications on AWS Infrastructure Services.

AWS Premium Support Information

The primary web page for information about AWS ElasticBeanstalk.

AWS Elastic Beanstalk ProductInformation

This form is only for account questions. For technicalquestions, use the Discussion Forums.

Form for questions related to your AWSaccount: Contact Us

Detailed information about the copyright and trademark usageat Amazon.com and other topics.

Conditions of Use

API Version 2010-12-0144

AWS Elastic Beanstalk User Guide

Page 48: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Glossary

application A logical collection of AWS Elastic Beanstalk components, including environments,versions, and environment configurations. In AWS Elastic Beanstalk, an applicationis conceptually similar to a folder.

application version A specific, labeled iteration of an application that represents a functionallyconsistent set of deployable application code. A version points to an Amazon S3object (a JAVA WAR file) that contains the application code.

CNAME A CNAME (Canonical Name Record) is a type of resource record in the DomainName System (DNS) that specifies that the domain name is an alias of another,canonical domain name. See the CNAME record Wikipedia article for moreinformation.

configuration template A series of key/value pairs that define parameters for the various AWS services(including Auto Scaling and Elastic Load Balancing) that AWS Elastic Beanstalkprovisions for an environment.

environment A specific running instance of an application. The application has a CNAME andincludes an application version and a customizable configuration (which is inheritedfrom the default container type).

environment configuration Identifies a collection of parameters and settings that define how an environmentand its associated resources behave.

API Version 2010-12-0145

AWS Elastic Beanstalk User Guide

Page 49: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Document Conventions

This section lists the common typographical and symbol use conventions for AWS technical publications.

Typographical ConventionsThis section describes common typographical use conventions.

Description/ExampleConvention

A call-out is a number in the body text to give you a visual reference. Thereference point is for further discussion elsewhere.

You can use this resource regularly.

Call-outs

Inline code samples (including XML) and commands are identified with aspecial font.

You can use the command java -version.

Code in text

Blocks of sample code are set apart from the body and marked accordingly.

# ls -l /var/www/html/index.html-rw-rw-r-- 1 root root 1872 Jun 21 09:33 /var/www/html/index.html# dateWed Jun 21 09:33:42 EDT 2006

Code blocks

Unusual or important words and phrases are marked with a special font.

You must sign up for an account before you can use the service.

Emphasis

References to a section in the same document are marked.

See Document Conventions (p. 46).

Internal cross references

API Version 2010-12-0146

AWS Elastic Beanstalk User GuideTypographical Conventions

Page 50: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Description/ExampleConvention

A special font is used for expressions that are important to identify, but arenot code.

If the value is null, the returned response will be false.

Logical values,constants, and regularexpressions, abstracta

Named AWS products and features are identified on first use.

Create an Amazon Machine Image (AMI).

Product and featurenames

In-text references to operations.

Use the GetHITResponse operation.

Operations

In-text references to parameters.

The operation accepts the parameter AccountID.

Parameters

In-text references to responses.

A container for one CollectionParent and one or moreCollectionItems.

Response elements

References to other AWS publications. If the reference is hyperlinked, it isalso underscored.

For detailed conceptual information, see the Amazon Mechanical TurkDeveloper Guide.

Technical publicationreferences

A special font marks text that the user types.

At the password prompt, type MyPassword.

User entered values

Denotes named items on the UI for easy identification.

On the File menu, click Properties.

User interface controlsand labels

When you see this style, you must change the value of the content when youcopy the text of a sample to a command line.

% ec2-register <your-s3-bucket>/image.manifest

See also Symbol Conventions (p. 48).

Variables

API Version 2010-12-0147

AWS Elastic Beanstalk User GuideTypographical Conventions

Page 51: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Symbol ConventionsThis section describes the common use of symbols.

Description/ExampleSymbolConvention

Within a code description, bar separators denote options fromwhich one must be chosen.

% data = hdfread (start | stride | edge)

(Parentheses | and| vertical | bars)

Mutuallyexclusiveparameters

Within a code description, square brackets denote completelyoptional commands or parameters.

% sed [-n, -quiet]

Use square brackets in XML examples to differentiate them fromtags.

<CustomerId>[ID]</CustomerId>

[square brackets]Optionalparameters

XML variabletext

Within a code sample, arrow brackets denote a variable thatmust be replaced with a valid value.

% ec2-register <your-s3-bucket>/image.manifest

<arrow brackets>Variables

API Version 2010-12-0148

AWS Elastic Beanstalk User GuideSymbol Conventions

Page 52: AWS Elastic Beanstalk - Amazon S3s3.amazonaws.com/awsdocs/ElasticBeanstalk/latest/awseb...Beanstalk.The AWS Elastic Beanstalk plug-in builds on top of the Eclipse Web Tools Platform

Document History

This document history is associated with the 2010-12-01 release of AWS Elastic Beanstalk. This guidewas last updated on May 27, 2011.

The following table describes the important changes since the last release of the AWS Elastic Beanstalkdocumentation set.

Release DateDescriptionChange

04 March 2011Added new topic Using Amazon RDS and MySQL Connector/Jwith AWS Elastic Beanstalk (p. 33).

New content

17 February2011

Updated some topics for new console user interface. Addednew topics Using Custom AMIs (p. 34) and Using CustomEnvironment Properties with AWS Elastic Beanstalk (p. 31).

New content

18 January2011

This is the initial release of AWS Elastic Beanstalk.New Service

05 May 2011This is the added support of Tomcat 7 for AWS ElasticBeanstalk.

New Container Type

API Version 2010-12-0149

AWS Elastic Beanstalk User Guide