Download - Amazon Web Services for Java developers
![Page 2: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/2.jpg)
Amazon Web Services
![Page 3: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/3.jpg)
How to start
deployscale
![Page 4: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/4.jpg)
Java APIs
![Page 5: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/5.jpg)
Amazon Web Services
![Page 6: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/6.jpg)
EC2Elastic Computer Cloud
http://aws.amazon.com/ec2/
![Page 7: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/7.jpg)
EBSElastic Block Storage
http://aws.amazon.com/ebs
![Page 8: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/8.jpg)
S3Simple Storage Service
http://aws.amazon.com/s3/
![Page 10: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/10.jpg)
SQSSimple Queue Service
http://aws.amazon.com/sqs/
![Page 11: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/11.jpg)
ELBElastic Load Balancing
http://aws.amazon.com/elb/
![Page 12: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/12.jpg)
RDSRelational Database Service
http://aws.amazon.com/rds/
![Page 13: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/13.jpg)
CloudFrontContent Delivery Network
http://aws.amazon.com/cloudfront/
![Page 14: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/14.jpg)
How to start
deployscale
![Page 15: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/15.jpg)
aws.amazon.com
![Page 16: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/16.jpg)
Access Key, Secret Key
Certificate
![Page 17: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/17.jpg)
ElasticFox
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609
![Page 20: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/20.jpg)
Choose/Make your AMI
![Page 21: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/21.jpg)
Start it !
![Page 22: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/22.jpg)
Javaday.Photos
![Page 23: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/23.jpg)
javaday.photoweb application
EC2 Instance
Amazon S3
JavadayphotoBucket
![Page 24: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/24.jpg)
Scale it
![Page 25: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/25.jpg)
javaday.photoweb application
EC2 Instance
Amazon S3
JavadayphotoBucket
javaday.photoweb application
EC2 Instance
Elastic Load Balancer
![Page 26: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/26.jpg)
Java APIs
![Page 27: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/27.jpg)
typica
http://code.google.com/p/typica
SQSEC2
SimpleDB
![Page 28: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/28.jpg)
Jec2 ec2 = new Jec2(AWSAccessKeyId, SecretAccessKey);
// describe imagesList<String> params = new ArrayList<String>();List<ImageDescription> images = ec2.describeImages(params);for (ImageDescription img : images) { if (img.getImageState().equals("available")) { log.info(img.getImageId()+"\t"+img.getImageLocation() +"\t"+img.getImageOwnerId()); }}
// describe instancesparams = new ArrayList<String>();List<ReservationDescription> instances = ec2.describeInstances(params);for (ReservationDescription res : instances) { log.info(res.getOwner()+"\t"+res.getReservationId()); if (res.getInstances() != null) { for (Instance inst : res.getInstances()) { log.info("\t"+inst.getImageId()+"\t"+inst.getDnsName() +"\t"+inst.getState()+"\t"+inst.getKeyName()); } }}
![Page 29: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/29.jpg)
jets3t
http://jets3t.s3.amazonaws.com/index.html
S3
![Page 30: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/30.jpg)
String key = "<my-key>"; String secret = "<secret>"; String bucket = "<bucket-name>"; S3Service s3Service; public Storage() throws S3ServiceException { AWSCredentials awsCredentials = new AWSCredentials(key, secret); s3Service = new RestS3Service(awsCredentials); }
public void listBuckets() throws S3ServiceException { S3Bucket[] myBuckets = s3Service.listAllBuckets(); for (S3Bucket bucket : myBuckets) System.out.println(bucket.getName()); }
public void storeFile(File f) throws S3ServiceException { S3Bucket photoBucket = getPhotoBucket(); S3Object obj = new S3Object(); obj.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ); obj.setDataInputFile(f); obj.setKey(""+System.currentTimeMillis()+"-"+f.getName()); //.... s3Service.putObject(photoBucket, obj); }
![Page 31: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/31.jpg)
jclouds
http://code.google.com/p/jclouds
S3EC2GAE
Rackspace
![Page 32: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/32.jpg)
Try it!aws.amazon.com
![Page 33: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/33.jpg)
http://www.knokode.com/aws4java.pdf
Get it!
![Page 34: Amazon Web Services for Java developers](https://reader033.vdocuments.us/reader033/viewer/2022052822/554ebeabb4c905de468b49b0/html5/thumbnails/34.jpg)
photo credits
http://www.sxc.hu/photo/1078164 http://www.sxc.hu/photo/599892http://www.istockphoto.com/stock-photo-6331752-spring.php
http://www.istockphoto.com/stock-photo-2121515-drowning-in-money.php
http://www.sxc.hu/photo/992832http://www.istockphoto.com/
stock-photo-8290194-blank-folder-with-scoring.phphttp://www.istockphoto.com/stock-photo-8298979-pill.php http://www.sxc.hu/photo/1216018
http://www.sxc.hu/photo/1144347 http://www.sxc.hu/photo/1237136 http://www.sxc.hu/photo/845473 http://www.sxc.hu/photo/998524
http://www.sxc.hu/photo/1236960