AWS for Startups, London - Programming AWS

1,929 views

Published on

An overview of the SDKs and tools available when working with AWS. Review of sample application code and a live demo of a deployment using AWS Elastic Beanstalk.

Published in: Technology
0 Comments
25 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,929
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
96
Comments
0
Likes
25
Embeds 0
No embeds

No notes for slide

AWS for Startups, London - Programming AWS

  1. 1. PROGRAMMING AMAZON WEB SERVICES Andreas Chatzakis | Solutions Architect AWS for Startups London, 12th September 2013
  2. 2. Agenda • Deploying your app: Elastic Beanstalk • Demo • Programmable Infrastructure: APIs, SDKs, CLI
  3. 3. “HOW DO I DEPLOY MY APP ?”
  4. 4. AWS Application Management Solutions Higher-level Services Elastic Beanstalk Convenience OpsWorks Do it yourself CloudFormation EC2 Control
  5. 5. ELASTIC BEANSTALK QUICKLY DEPLOY AND MANAGE APPLICATIONS
  6. 6. Select a Container IIS, Node.js, PHP, Python, Ruby, Tomcat
  7. 7. DEPLOY YOUR APPLICATION
  8. 8. THE CONTAINER IS CREATED IN EC2 User Application Application Service HTTP Service Language Interpreter Operating System Host
  9. 9. ELASTIC BEANSTALK TAKES CARE OF THE ENVIRONMENT
  10. 10. ADDING ELASTIC LOAD BALANCER
  11. 11. CONFIGURING AUTO SCALING GROUP
  12. 12. LAUNCHING INSTANCE(S)
  13. 13. ALL WIRED WITH ELASTIC BEANSTALK
  14. 14. APPLICATION IS PUBLISHED UNDER A CNAME
  15. 15. WITH LOGS AND APP VERSIONS STORED IN S3
  16. 16. HOW DO YOU CREATE AN APPLICATION FOR ELASTIC BEANSTALK ?
  17. 17. LIKE ANY OTHER APPLICATION
  18. 18. Java .war file IDE plugins Microsoft Web Deploy package PHP .zip file Git integration Python .zip file PACKAGE UP AS NORMAL
  19. 19. CONSOLE DEPLOYMENTS AND VERSION UPDATES
  20. 20. CheckDNSAvailability eb init elastic-beanstalk-check-dns-availability CreateApplication wizard to initialize an application eb start/stop elastic-beanstalk-create-application CreateApplicationVersion start/stop an application eb update elastic-beanstalk-create-application-version CreateEnvironment update application version eb status elastic-beanstalk-create-environment get status of a running application COMMAND LINE TOOLS AND “WIZARDS”
  21. 21. ECLIPSE INTEGRATION
  22. 22. VISUAL STUDIO INTEGRATION
  23. 23. GIT INTEGRATION
  24. 24. CONTAINER CONFIGURATION
  25. 25. CONTAINER CUSTOMIZATION
  26. 26. ENVIRONMENTAL PROPERTIES Accessible from within the application e.g.: define('S3_BUCKET', $_SERVER['PARAM1']);
  27. 27. TIME FOR A DEMO
  28. 28. AWS is a set of building blocks
  29. 29. WHAT DO I NEED TO Object Storage Send Email Message Queue Notification (Pub & Sub) NoSQL DB Video Transcoding Content Delivery Monitoring Search DO ?
  30. 30. WHAT DO I NEED TO ? Object Storage S3 Send Email SES Message Queue SQS Notification (Pub & Sub) SNS NoSQL DB DynamoDB Video Transcoding Elastic Transcoder Content Delivery CloudFront Monitoring CloudWatch Search CloudSearch
  31. 31. = PROGRAMMABLE PLATFORM
  32. 32. API | SDK | CLI
  33. 33. API | SDK | CLI
  34. 34. // Load the AWS PHP SDK require __DIR__ . '/../vendor/autoload.php'; $aws = AwsCommonAws::factory('/path/to/config.json'); // Instantiate the s3 client $s3client = $aws->get('s3');
  35. 35. // List available S3 buckets try { $result = $s3client->listBuckets(); foreach ($result['Buckets'] as $bucket) { echo "- {$bucket['Name']}n"; } } catch (AwsS3ExceptionS3Exception $e) { echo "Request failed.n"; } echo "n"; // upload an object into S3 $s3client->putObject(array( 'Bucket' => $bucketName, 'Key' => $objectKey, 'Body' => fopen($file->getPathname(), 'r'), 'ACL' => CannedAcl::PUBLIC_READ, ));
  36. 36. // Instantiate the DynamoDB client $ddb = $aws->get('dynamodb'); // Get today's flavors from DynamoDB $date = new DateTime(); $result = $ddb->getItem(array( 'TableName' => 'flavors-of-the-day', 'Key' => array( 'HashKeyElement' => array('N' => $date->format('n')), 'RangeKeyElement' => array('N' => $date->format('j')) ) )); $flavors = $result->getPath('Item/flavors/SS');
  37. 37. - Temporary AWS credentials provisioned on EC2 instances Automatically rotated for you multiple times per day. Initialize the client and the AWS SDK will do the rest. Increased security & convenience
  38. 38. “All files stored online by Dropbox are encrypted and kept securely on Amazon’s Simple Storage Service (S3) in multiple data centers located across the United States.”
  39. 39. “Amazon DynamoDB initially served as a secondary data store for user activity and interaction logs. However, this new NoSQL database service was integrated into the production environment as the primary data store when Shazam realized it could support over 500,000 writes per second.”
  40. 40. FREE TIER http://aws.amazon.com/free TOOLS & SDKs http://aws.amazon.com/tools ELASTIC BEANSTALK http://aws.amazon.com/elasticbeanstalk BLOG http://aws.typepad.com

×