Download Amazon AWS SDK User guide
Transcript
AWS SDK for Java Developer Guide Table of Contents What is the AWS SDK for Java? ....................................................................................................... 1 About the AWS SDK for Java ................................................................................................... 1 Browse the Source at GitHub .......................................................................................... 1 Developing AWS Applications for Android .......................................................................... 2 What's in this Guide? ............................................................................................................. 2 Viewing the Revision History for the SDK for Java ....................................................................... 2 About Amazon Web Services .................................................................................................. 3 Getting Started ............................................................................................................................. 4 Get an AWS Account and Your AWS Credentials ......................................................................... 4 Install a Java Development Environment .................................................................................... 5 Install the AWS SDK for Java ................................................................................................... 5 Set up your AWS Credentials for Use with the SDK for Java .......................................................... 6 Explore the SDK for Java Code Samples ................................................................................... 7 Where to Go from Here .......................................................................................................... 7 AWS SDK for Java Basics ............................................................................................................... 8 Providing Credentials ............................................................................................................. 8 Using the Default Credential Provider Chain ....................................................................... 9 Specifying a Credential Provider or Provider Chain ............................................................ 10 Explicitly Specifying Credentials ..................................................................................... 10 See Also .................................................................................................................... 11 AWS Region Selection .......................................................................................................... 11 Client Networking Configuration ............................................................................................. 12 Setting the JVM TTL for DNS Name Lookups ........................................................................... 13 Exception Handling .............................................................................................................. 13 Logging ............................................................................................................................. 15 Setting the Classpath ................................................................................................... 15 Service-Specific Errors and Warnings ............................................................................. 15 Request/Response Summary Logging ............................................................................ 16 Verbose Wire Logging .................................................................................................. 16 Access Control Policies ......................................................................................................... 17 Using AWS Services .................................................................................................................... 20 DynamoDB ......................................................................................................................... 20 Manage Tomcat Session State with DynamoDB ................................................................ 20 Amazon EC2 ...................................................................................................................... 23 Starting an Amazon EC2 Instance .................................................................................. 23 Using IAM Roles for EC2 Instances ................................................................................ 29 Tutorial: Amazon EC2 Spot Instances .............................................................................. 36 Tutorial: Advanced Amazon EC2 Spot Request Management .............................................. 45 Amazon SWF ...................................................................................................................... 63 Registering an Amazon SWF Domain ............................................................................. 63 Listing Amazon SWF Domains ....................................................................................... 63 Additional Resources ................................................................................................................... 65 Home Page for the AWS SDK for Java ..................................................................................... 65 SDK Reference Documentation .............................................................................................. 65 AWS Java Developer Blog ..................................................................................................... 65 AWS Forums ...................................................................................................................... 66 AWS Toolkit for Eclipse ......................................................................................................... 66 SDK for Java Source Code and Samples ................................................................................. 66 SDK for Java Code Samples .................................................................................................. 66 List of Code Samples ................................................................................................... 66 Building and Running the Samples using the Command Line .............................................. 67 Building and Running the Samples using the Eclipse IDE ................................................... 68 Document History ........................................................................................................................ 70 Version v1.0.0 iii