User guide

Troubleshooting
If you encounter issues with the session manager, the first place to look is in catalina.out. If you have
access to the Tomcat installation, you can go directly to this log file and look for any error messages from
the session manager. If you're using Elastic Beanstalk, you can view the environment logs with the AWS
Management Console or the AWS Toolkit for Eclipse.
Limitations
The session manager does not support session locking.Therefore, applications that use many concurrent
AJAX calls to manipulate session data may not be appropriate for use with the session manager, due to
race conditions on session data writes and saves back to the data store.
Programming Amazon EC2 with the AWS SDK
for Java
This section provides information specific to programming Amazon EC2 with the SDK for Java.
Topics
Tutorial: Starting an EC2 Instance (p. 26)
Using IAM Roles to Grant Access to AWS Resources on Amazon EC2 (p. 30)
Tutorial: Amazon EC2 Spot Instances (p. 35)
Tutorial: Advanced Amazon EC2 Spot Request Management (p. 44)
Tutorial: Starting an EC2 Instance
This tutorial demonstrates how to use the AWS SDK for Java to start an EC2 instance.
Prerequisites
Before you begin, be sure that you have created an AWS account and that you have set up your AWS
credentials. For more information, see Getting Started (p. 4).
Tasks
Create an Amazon EC2 Client Using the SDK for Java (p. 26)
Create an Amazon EC2 Security Group (p. 27)
Create a Key Pair (p. 29)
Run an Amazon EC2 Instance (p. 29)
Create an Amazon EC2 Client Using the SDK for Java
Create an Amazon EC2 client in order to manage your EC2 resources, such as instances and security
groups.
To create and initialize an Amazon EC2 client
1. Create and initialize an AWSCredentials instance. Specify the AwsCredentials.properties file
you created, as follows:
Version v1.0.0
26
AWS SDK for Java Developer Guide
Amazon EC2