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 AWS 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
• Starting an Amazon EC2 Instance (p. 23)
• Using IAM Roles for EC2 Instances with the AWS SDK for Java (p. 29)
• Tutorial: Amazon EC2 Spot Instances (p. 36)
• Tutorial: Advanced Amazon EC2 Spot Request Management (p. 45)
Starting an Amazon EC2 Instance
This topic demonstrates how to use the AWS SDK for Java to start an Amazon Elastic Compute Cloud
(Amazon EC2) instance.
Topics
• Create an Amazon EC2 Client (p. 23)
• Create an Amazon EC2 Security Group (p. 24)
• Authorize Security Group Ingress (p. 25)
• Create a Key Pair (p. 26)
• Run an Amazon EC2 Instance (p. 27)
• Connect to Your Amazon EC2 Instance (p. 28)
• Related Resources (p. 29)
Create an Amazon EC2 Client
You will need an Amazon EC2 client in order to create security groups and key pairs, and run Amazon
EC2 instances. Before initializing your client, however, you need to create an
AwsCredentials.properties file to store your AWS access key and your secret key.
The file looks like this:
Version v1.0.0
23
AWS SDK for Java Developer Guide
Amazon EC2