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.
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!
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
PRODUCTION APP DEVELOPMENT INVOLVES MANY THINGS ▸ Code & Tests ▸ User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management
PRODUCTION APP DEVELOPMENT INVOLVES MANY THINGS ▸ Code & Tests ▸ User Authentication ▸ Monitoring ▸ Load Balancing ▸ Auto Scaling ▸ Handling Server/Container Failures ▸ Security Isolation ▸ Operating System Management
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
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
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
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
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
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
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
SERVERLESS BENEFITS ▸ AWS Lambda handles many elasticity, scalability, high- availability, security and fault-tolerance problems for you. ▸ Focus more on code, ship faster.
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