Building Serverless Applications in Ruby with AWS Lambda

Fceb24dfe052368eec601f5a0934fa42?s=47 Alex Wood
April 18, 2019

Building Serverless Applications in Ruby with AWS Lambda

An overview of the benefits of AWS Lambda, and a survey of open source tools that can help Ruby developers create serverless applications using AWS Lambda.

Fceb24dfe052368eec601f5a0934fa42?s=128

Alex Wood

April 18, 2019
Tweet

Transcript

  1. BUILDING SERVERLESS APPLICATIONS IN RUBY WITH AWS LAMBDA

  2. WHO AM I? ▸ Currently: Building Serverless Open Source Tooling

    at AWS ▸ Formerly: AWS SDK for Ruby Team ▸ Author of Ruby runtime for AWS Lambda ▸ Twitter: @alexwwood ▸ Please do tweet your comments and questions about this talk!
  3. AGENDA ▸ Overview of AWS Lambda & Ecosystem ▸ Review

    of Open Source Tools ▸ AWS SAM CLI ▸ AWS SDK for Ruby ▸ aws-record ▸ Demo ▸ Web and Event-Driven Application Hybrid
  4. AWS LAMBDA & ECOSYSTEM

  5. SERVERLESS IS DEAD. Chris Munns, AWS Principal Developer Advocate CAUSE

    OF DEATH: EXCESSIVE BUZZWORD USAGE
  6. WHAT SERVERLESS MEANS

  7. WHAT SERVERLESS MEANS No Servers to Provision or Manage

  8. WHAT SERVERLESS MEANS Scales With Usage

  9. WHAT SERVERLESS MEANS Pay For Value

  10. WHAT SERVERLESS MEANS Availability and Fault Tolerance Built In

  11. PRODUCTION APP DEVELOPMENT INVOLVES MANY THINGS ▸ Code & Tests

    ▸ User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management
  12. PRODUCTION APP DEVELOPMENT INVOLVES MANY THINGS ▸ Code & Tests

    ▸ User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management
  13. AWS LAMBDA HANDLES MANY THINGS ▸ Code & Tests ▸

    User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management AWS Lambda Handles These AWS Lambda Integrates With Solutions For These
  14. AWS LAMBDA WORKS FOR MANY THINGS ▸ Web Applications ▸

    Backend Services ▸ Data Processing ▸ Chatbots ▸ Amazon Alexa ▸ IT Automation
  15. OPEN SOURCE TOOLS

  16. THIS IS ONE OF THE THINGS MY NEW TEAM OWNS

    AWS SAM CLI ▸ Generate, Build, and Deploy Serverless Applications ▸ Develop and Test AWS Lambda Functions Locally ▸ Local API Gateway w/ Hot Reloading ▸ https://github.com/awslabs/aws-sam-cli
  17. NOW IN VERSION 3! AWS SDK FOR RUBY ▸ Supports

    >= 174 AWS services. ▸ Built-in support for pagination, waiters for state changes. ▸ Helpful abstractions for Amazon S3, Amazon SQS, and more. ▸ Modularized with statically generated code for performance. ▸ Removes 'autoload' for thread safety. ▸ https://github.com/aws/aws-sdk-ruby
  18. WATCH THE "DAT401" SESSION FROM AWS RE:INVENT 2018, YOU WON'T

    REGRET IT AWS-RECORD GEM ▸ Data mapping abstraction library for Amazon DynamoDB. ▸ Similar patterns to ActiveRecord APIs. ▸ Full support for collection types (Lists, Maps, Sets). ▸ Declarative table configuration and migrations. ▸ https://github.com/aws/aws-sdk-ruby-record
  19. LIVE DEMO IF YOU JUST CAME FOR THE DOGS, THEN

    THIS IS WHAT YOU CAME FOR!
  20. THE IMPORTANT THING IS THAT IT HAS PUPPIES. EVERYTHING ELSE

    IS A BONUS! DOG RATING APP DESIGN ObjectCreated API Gateway Sinatra App Is it a dog? Write to Index if Dog DynamoDB Table Upload via Presigned Post ‣ Show Dogs ‣ Upload Dog ‣ Rate Dog
  21. THE IMPORTANT THING IS THAT IT HAS PUPPIES. EVERYTHING ELSE

    IS A BONUS! WEB APPLICATION COMPONENTS API Gateway Sinatra App DynamoDB Table Upload via Presigned Post ‣ Show Dogs ‣ Upload Dog ‣ Rate Dog
  22. THE IMPORTANT THING IS THAT IT HAS PUPPIES. EVERYTHING ELSE

    IS A BONUS! EVENT-DRIVEN COMPONENTS ObjectCreated Is it a dog? Write to Index if Dog DynamoDB Table
  23. THE IMPORTANT THING IS THAT IT HAS PUPPIES. EVERYTHING ELSE

    IS A BONUS! EVENT-DRIVEN COMPONENTS ObjectDeleted DynamoDB Table Delete Item from Table
  24. CAN YOU JUST SHOW ME THE DEMO, PLEASE? - Somebody

    (Probably)
  25. CONCLUSION

  26. SERVERLESS BENEFITS ▸ AWS Lambda handles many elasticity, scalability, high-

    availability, security and fault-tolerance problems for you. ▸ Focus more on code, ship faster.
  27. 4 OUT OF 5 DENTISTS RECOMMEND CHECKING THESE TALKS OUT

    RELATED TALKS ▸ ATX Serverless Days 2019 - Serverless is Dead ▸ AWS re:Invent 2018 ARC306 - Serverless Architectural Patterns ▸ AWS re:Invent 2018 SRV305 - Inside AWS: Technology Choices for Modern Applications ▸ AWS re:Invent 2018 DAT401 - Advanced Design Patterns for Amazon DynamoDB
  28. THANK YOU! ▸ Find our work on GitHub: ▸ https://github.com/aws/aws-sdk-ruby

    ▸ https://github.com/aws/aws-sdk-ruby-record ▸ https://github.com/awslabs/aws-sam-cli ▸ Find me on the internets: ▸ Twitter: @alexwwood ▸ Web: https://alexwood.codes