Post on 15-Jan-2015
description
© 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
Session Goal
Learn how to develop AWS applications faster
• High-level APIs
By taking advantage of…
AWS SDK for Java
• Easy, secure, and robust access to AWS
• Open Source – Find us on GitHub!
• Apache 2.0 licensed
• Distributed through Maven
AWS SDK for Java
AWS Toolkit for Eclipse
• Develop, Debug,
and Deploy AWS
applications
• Open source
• Develop AWS Android
applications
• Deploy and manage AWS
CloudFormation stacks
AWS Toolkit for Eclipse
AWS Meme Generator
AWS Meme Generator
Developing the Meme Generator
• Creating AWS projects in Eclipse
• Working with Amazon S3
• Working with Amazon DynamoDB
• Hosting web apps in AWS Elastic Beanstalk
Creating New AWS Java Projects
Get your projects off to a
fast start!
Amazon Simple Storage Service (S3)
Unlimited storage in the cloud
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;
}
Amazon S3 Iterators
Using S3Objects or S3Versions:
for (S3ObjectSummary summary :
S3Objects.withPrefix(s3, myBucket, "photos/”)) {
System.out.println("Object: ” + summary);
}
Amazon S3 TransferManager
• Asynchronous management of S3 data transfers
• Simple interface
• Client-side best
practices and
optimizations
Amazon S3 TransferManager
TransferManager
• upload
• download
Transfer
Upload Download
• state
• description
• progress
• listeners
• wait
ProgressListener
• progressChanged
Amazon DynamoDB A fully managed NoSQL database with fast and predictable performance
DynamoDB Object Mapper
• Automatic data marshaling from POJOs
• Scanning and querying your data
• Batching data updates
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);
AWS Elastic Beanstalk Quickly deploy and manage web applications in the AWS cloud
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
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
Please give us your feedback on this
presentation
As a thank you, we will select prize
winners daily for completed surveys!
TLS301