Diving Into the New AWS SDK for Ruby (TLS305) | AWS re:Invent 2013

1,847 views

Published on

Ruby developers: attend this session and learn about the next major version of the AWS SDK for Ruby, the aws-core gem. We dive deep into the SDK, covering topics such as waiters, request enumeration and pagination, resource modeling, version locking, and more. Learn how to take advantage of these features as we construct a sample Ruby application using the AWS SDK.

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

  • Be the first to like this

No Downloads
Views
Total views
1,847
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Diving Into the New AWS SDK for Ruby (TLS305) | AWS re:Invent 2013

  1. 1. Diving Into the New AWS SDK for Ruby Trevor Rowe & Loren Segal November 13, 2013 © 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. Friday, November 15, 13
  2. 2. Friday, November 15, 13
  3. 3. Friday, November 15, 13
  4. 4. Friday, November 15, 13
  5. 5. Goals Friday, November 15, 13
  6. 6. Introduce Core Goals Friday, November 15, 13
  7. 7. Goals Friday, November 15, 13 Introduce Core Hands on Experience
  8. 8. Goals Friday, November 15, 13 Introduce Core Hands on Experience Extending the SDK
  9. 9. Goals Friday, November 15, 13 Introduce Core Hands on Experience Extending the SDK Contributing
  10. 10. gem install aws-sdk Friday, November 15, 13
  11. 11. Friday, November 15, 13
  12. 12. 2.0 Friday, November 15, 13
  13. 13. Why Version 2.0? Friday, November 15, 13
  14. 14. Validation Why Version 2.0? Friday, November 15, 13
  15. 15. Validation Structured Responses Why Version 2.0? Friday, November 15, 13
  16. 16. Why Version 2.0? Friday, November 15, 13 Validation Structured Responses Better Documentation
  17. 17. Why Version 2.0? Friday, November 15, 13 Validation Structured Responses Better Documentation Extensibility
  18. 18. Why Version 2.0? Friday, November 15, 13 Validation Structured Responses Better Documentation Extensibility Consistency
  19. 19. gem install aws-sdk-core Friday, November 15, 13
  20. 20. Friday, November 15, 13
  21. 21. Version 1 aws-sdk Friday, November 15, 13
  22. 22. Version 1 Version 2 aws-sdk aws-sdk-core Friday, November 15, 13
  23. 23. Version 1 Version 2 aws-sdk work-in-progress aws-sdk-core Friday, November 15, 13
  24. 24. Code Friday, November 15, 13
  25. 25. Key Differences Friday, November 15, 13
  26. 26. New Namespace Key Differences Friday, November 15, 13
  27. 27. New Namespace Memoization Everywhere Key Differences Friday, November 15, 13
  28. 28. Key Differences Friday, November 15, 13 New Namespace Memoization Everywhere Ruby 1.9+
  29. 29. Key Differences Friday, November 15, 13 New Namespace Memoization Everywhere Ruby 1.9+ Flexible Dependencies
  30. 30. Key Differences Friday, November 15, 13 New Namespace Memoization Everywhere Ruby 1.9+ Flexible Dependencies Structured Responses
  31. 31. What’s Coming? Friday, November 15, 13
  32. 32. Resources What’s Coming? Friday, November 15, 13
  33. 33. Resources Enumeration What’s Coming? Friday, November 15, 13
  34. 34. What’s Coming? Friday, November 15, 13 Resources Enumeration Pagination
  35. 35. What’s Coming? Friday, November 15, 13 Resources Enumeration Pagination Helpers
  36. 36. What’s Coming? Friday, November 15, 13 Resources Enumeration Pagination Helpers Service Gems
  37. 37. Developer Preview Friday, November 15, 13
  38. 38. Public Developer Preview Friday, November 15, 13
  39. 39. Developer Preview Friday, November 15, 13 Public Feedback
  40. 40. Developer Preview Friday, November 15, 13 Public Feedback Stability
  41. 41. Extending The SDK Friday, November 15, 13
  42. 42. Friday, November 15, 13
  43. 43. Request Friday, November 15, 13 Response
  44. 44. Request Friday, November 15, 13 Response
  45. 45. Validate Request Friday, November 15, 13 Response
  46. 46. Serialize Validate Request Friday, November 15, 13 Response
  47. 47. Send Serialize Validate Request Friday, November 15, 13 Response
  48. 48. Send Parse Serialize Validate Request Friday, November 15, 13 Response
  49. 49. Send Parse Middleware Serialize Validate Request Friday, November 15, 13 Response
  50. 50. Send Application Parse Middleware Serialize Validate Request Friday, November 15, 13 Response
  51. 51. Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13
  52. 52. Ideas: Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13
  53. 53. Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13 Ideas: Data Integrity Checks
  54. 54. Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13 Ideas: Data Integrity Checks Extended Retry Logic
  55. 55. Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13 Ideas: Data Integrity Checks Extended Retry Logic Default Values
  56. 56. Writing Plugins * The entire SDK is written as a series of plugins Friday, November 15, 13 Ideas: Data Integrity Checks Extended Retry Logic Default Values Cross Service Hooks
  57. 57. Plugins, Handlers and Context, Oh My! Friday, November 15, 13
  58. 58. Plugins, Handlers and Context, Oh My! Plugin Configuration Handlers Friday, November 15, 13
  59. 59. Plugins, Handlers and Context, Oh My! Plugin Configuration Configuration Options Defaults Handlers Friday, November 15, 13
  60. 60. Plugins, Handlers and Context, Oh My! Plugin Configuration Configuration Handlers Friday, November 15, 13 #call method Defaults Handlers Options Build request Parse response
  61. 61. Plugins, Handlers and Context, Oh My! Plugin Context • provides a DSL • easy to add/remove • • • • • • • Handler • stacked • similar to rack middleware Friday, November 15, 13 operation name configuration request parameters http request http response response data response error
  62. 62. Plugins, Handlers and Context, Oh My! Plugin Context • provides a DSL • easy to add/remove • • • • • • • operation name configuration request parameters http request http response response data response error Let’s Build Something! Handler • stacked • similar to rack middleware Friday, November 15, 13
  63. 63. Best Practices • Depend on major versions of the SDK • gem  “aws-­‐sdk-­‐core”,  “~>  2.0” • API Locking • Lock your clients to a specific API version • Aws::DynamoDB.new(api_version:  ‘2012-­‐08-­‐10’) • Secure Credential Management • Rotate credentials • Use IAM roles for EC2 instances when possible • ENV variables (Heroku, etc.) • From a file on disk (outside source control) • Never check your credentials into source control! Friday, November 15, 13
  64. 64. Contributing Friday, November 15, 13
  65. 65. Open Source Friday, November 15, 13
  66. 66. GitHub issues Open Source Friday, November 15, 13
  67. 67. GitHub issues Pull Requests Open Source Friday, November 15, 13
  68. 68. Open Source Friday, November 15, 13 GitHub issues Pull Requests Test Coverage
  69. 69. Open Source Friday, November 15, 13 GitHub issues Pull Requests Test Coverage Docs/Guides
  70. 70. Open Source Friday, November 15, 13 GitHub issues Pull Requests Test Coverage Docs/Guides Samples
  71. 71. Open Source Friday, November 15, 13 GitHub issues Pull Requests Test Coverage Docs/Guides Samples 3rd Party Gems
  72. 72. Links of Interest Friday, November 15, 13
  73. 73. Links of Interest https://github.com/aws/aws-sdk-core-ruby Friday, November 15, 13
  74. 74. Links of Interest https://github.com/aws/aws-sdk-core-ruby http://ruby.awsblog.com/ Friday, November 15, 13
  75. 75. Links of Interest https://github.com/aws/aws-sdk-core-ruby http://ruby.awsblog.com/ https://forums.aws.amazon.com/forum.jspa?forumID=125 Friday, November 15, 13
  76. 76. Links of Interest https://github.com/aws/aws-sdk-core-ruby http://ruby.awsblog.com/ https://forums.aws.amazon.com/forum.jspa?forumID=125 @awsforruby Friday, November 15, 13
  77. 77. Please give us your feedback on this presentation TLS305 As a thank you, we will select prize winners daily for completed surveys! Friday, November 15, 13 Thank You

×