Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Serverless Applications in Ruby with A...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
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.

Alex Wood

April 18, 2019

Transcript

28 slides
  1. 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!
  2. 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
  3. PRODUCTION APP DEVELOPMENT INVOLVES MANY THINGS ▸ Code & Tests

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

    ▸ User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management
  5. 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
  6. AWS LAMBDA WORKS FOR MANY THINGS ▸ Web Applications ▸

    Backend Services ▸ Data Processing ▸ Chatbots ▸ Amazon Alexa ▸ IT Automation
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. THE IMPORTANT THING IS THAT IT HAS PUPPIES. EVERYTHING ELSE

    IS A BONUS! EVENT-DRIVEN COMPONENTS ObjectDeleted DynamoDB Table Delete Item from Table
  14. SERVERLESS BENEFITS ▸ AWS Lambda handles many elasticity, scalability, high-

    availability, security and fault-tolerance problems for you. ▸ Focus more on code, ship faster.
  15. 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
  16. 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

More Decks by Alex Wood

Other Decks in Programming