Amazon Web Services for Java developers

  • 6,722 views
Uploaded on

Overview of Amazon Web Services. Tools to get started. Java libraries to manage AWS infrastructure.

Overview of Amazon Web Services. Tools to get started. Java libraries to manage AWS infrastructure.

More in: Technology , Design
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
6,722
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
162
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Amazon Web Services for Java developers Filippo Diotalevi filippo@diotalevi.com twitter.com/fdiotalevi
  • 2. Amazon Web Services
  • 3. How to start deploy scale
  • 4. Java APIs
  • 5. Amazon Web Services
  • 6. EC2 Elastic Computer Cloud http://aws.amazon.com/ec2/
  • 7. EBS Elastic Block Storage http://aws.amazon.com/ebs
  • 8. S3 Simple Storage Service http://aws.amazon.com/s3/
  • 9. SimpleDB http://aws.amazon.com/simpledb/
  • 10. SQS Simple Queue Service http://aws.amazon.com/sqs/
  • 11. ELB Elastic Load Balancing http://aws.amazon.com/elb/
  • 12. RDS Relational Database Service http://aws.amazon.com/rds/
  • 13. CloudFront Content Delivery Network http://aws.amazon.com/cloudfront/
  • 14. How to start deploy scale
  • 15. aws.amazon.com
  • 16. Access Key, Secret Key Certificate
  • 17. http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609 ElasticFox
  • 18. S3 Organizer http://www.s3fox.com
  • 19. Decaf http://decaf.9apps.net
  • 20. Choose/Make your AMI
  • 21. Start it !
  • 22. Javaday.Photos
  • 23. javaday.photo web application EC2 Instance Javaday photo Bucket Amazon S3
  • 24. Scale it
  • 25. Elastic Load Balancer javaday.photo javaday.photo web application web application EC2 Instance EC2 Instance Javaday photo Bucket Amazon S3
  • 26. Java APIs
  • 27. typica SQS EC2 SimpleDB http://code.google.com/p/typica
  • 28. Jec2 ec2 = new Jec2(AWSAccessKeyId, SecretAccessKey); // describe images List<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 instances params = 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()); } } }
  • 29. jets3t S3 http://jets3t.s3.amazonaws.com/index.html
  • 30. 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); }
  • 31. jclouds S3 EC2 GAE Rackspace http://code.google.com/p/jclouds
  • 32. Try it! aws.amazon.com
  • 33. Get it! http://www.knokode.com/aws4java.pdf
  • 34. http://www.istockphoto.com/ http://www.istockphoto.com/ http://www.sxc.hu/photo/1078164 http://www.sxc.hu/photo/599892 stock-photo-6331752-spring.php stock-photo-2121515-drowning-in-money.php http://www.istockphoto.com/ http://www.istockphoto.com/ http://www.sxc.hu/photo/992832 stock-photo-8298979-pill.php stock-photo-8290194-blank-folder-with-scoring.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 photo credits