Page 1
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
TLS301
Accelerate Your Java Development on AWS
Jason Fulghum, AWS SDKs and Tools
November 14, 2013
Page 2
Session Goal
Learn how to develop AWS applications faster
• High-level APIs
By taking advantage of…
Page 3
AWS SDK for Java
• Easy, secure, and robust access to AWS
• Open Source – Find us on GitHub!
• Apache 2.0 licensed
• Distributed through Maven
Page 5
AWS Toolkit for Eclipse
• Develop, Debug,
and Deploy AWS
applications
• Open source
Page 6
• Develop AWS Android
applications
• Deploy and manage AWS
CloudFormation stacks
AWS Toolkit for Eclipse
Page 7
AWS Meme Generator
Page 8
AWS Meme Generator
Page 9
Developing the Meme Generator
• Creating AWS projects in Eclipse
• Working with Amazon S3
• Working with Amazon DynamoDB
• Hosting web apps in AWS Elastic Beanstalk
Page 10
Creating New AWS Java Projects
Get your projects off to a
fast start!
Page 11
Amazon Simple Storage Service (S3)
Unlimited storage in the cloud
Page 12
Amazon S3 – Listing Objects
ObjectListing page = s3.listObjects(myBucket, "photos/");
while (true) {
for (S3ObjectSummary objectSummary :
page.getObjectSummaries()) {
System.out.println("Object: ” + summary);
}
if (page.isTruncated)
page = s3.listNextBatchOfObjects(page);
else break;
}
Page 13
Amazon S3 Iterators
Using S3Objects or S3Versions:
for (S3ObjectSummary summary :
S3Objects.withPrefix(s3, myBucket, "photos/”)) {
System.out.println("Object: ” + summary);
}
Page 14
Amazon S3 TransferManager
• Asynchronous management of S3 data transfers
• Simple interface
• Client-side best
practices and
optimizations
Page 15
Amazon S3 TransferManager
TransferManager
• upload
• download
Transfer
Upload Download
• state
• description
• progress
• listeners
• wait
ProgressListener
• progressChanged
Page 16
Amazon DynamoDB A fully managed NoSQL database with fast and predictable performance
Page 17
DynamoDB Object Mapper
• Automatic data marshaling from POJOs
• Scanning and querying your data
• Batching data updates
Page 18
S3Link
• New type supported by the DynamoDB Mapper
• References data stored in Amazon S3
• Simplifies working the referenced data
DynamoDB Table
S3Link
Amazon S3
Bucket
s3link.uploadFrom(mySourceFile);
s3link.downloadTo(myDestFile);
s3link.setAcl(myCustomAcl);
Page 19
AWS Elastic Beanstalk Quickly deploy and manage web applications in the AWS cloud
Page 20
AWS Elastic Beanstalk Concepts
• Applications – The projects you’re building
• Application Versions – Uploads of code for your project
• Environments – A running application: a specific application version plus
all the infrastructure to run your application
Page 21
More to Explore
• Follow the AWS Java Developer Blog – http://java.awsblog.com
– Twitter: @awsforjava
• Download the AWS SDK for Java – http://aws.amazon.com/sdkforjava
• Install the AWS Toolkit for Eclipse – http://aws.amazon.com/eclipse
• Find us on GitHub – https://github.com/aws
Page 22
Please give us your feedback on this
presentation
As a thank you, we will select prize
winners daily for completed surveys!
TLS301