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

The Case for Rails on Lambda v1

The Case for Rails on Lambda v1

What started as Function as a Service (FaaS) for many is quickly becoming a fulfilled promise on the future of a commoditized cloud-compute platform. Event-driven and deeply integrated within AWS, Lambda allows your Rails architecture to be completely reimagined (without change) atop fully managed infrastructure resources like API Gateway, SQS, S3, CloudWatch, IAM, and much more. Come find out how Lamby can help your engineering teams learn to "program the cloud".

Ken Collins

July 15, 2021

More Decks by Ken Collins

Other Decks in Technology


  1. • Custom Ink’s Cloud Story. Servers to Serverless. • How

    does Rails work on Lambda? High level intro. • Why the hell would we, or should you, do this? • Cloud-Native Rails. Helpful tools and projects. • Closing thoughts on our future with the Cloud. 2 Today’s Topics
  2. 6

  3. 7

  4. Lamby is as a Rack adapter that converts AWS Lambda

    integration events into native Rack Environment objects which are sent directly to your application. Lamby can do this when using either API Gateway REST API, API Gateway HTTP API's v1/v2 payloads, or even Application Load Balancer (ALB) integrations. 19 https://lamby.custominktech.com
  5. • Container Packages. Up to 10 GB Size. ECR or

    DIY. • Up to 6 vCPU and 10 GB Memory. Zip or Container. • Usage of a VPC has no performance penalties. • API Gateway HTTP API fast & cheap for public apps. • The AWS SAM CLI (CloudFormation) is easy IaC. • CloudWatch Logs, Insights, and Metrics are built in. • Integrate CodeDeploy Blue Green Rollouts. • Provisioned Concurrency can kill cold starts for $$$. Lambda Highlights 21
  6. • Our first workload was ~90% EC2 cost savings. Years

    later, others could be 70%, 30%, or 130%. Depends on your current right sizing and infrastructure. • Private Applications cost more. REST API w/ALB via VPC Endpoint easily consumes EC2 cost savings. • Factor in capability unlocks. Could be technical ones like using cloud-native integrations. Could be process like building DevOps experience. Cost Savings (Efficiency Dilemma) 29 https://aws.amazon.com/lambda/resources/customer-testimonials/
  7. Infrastructure as Code (IaC) 30 • Project-based IaC is a

    game changer for dev velocity. Great example is IAM Roles with Lambda. • SAM/CloudFormation is a great start and always getting better. Like modules & the public directory. • Graduate later to CDK or Terraform which can express existing resources.
  8. AWS as a Framework 31 • Lambda is deeply integrated

    into AWS’ event model. • Lambda can help your path to Cloud Modernization. • Managed tooling/pipelines. CodeBuild blue/green. • Lambda unlocks new architecture capabilities. https://medium.com/galvanize/aws-as-a-framework-9abd2b1f6dc1
  9. • Distinct web & jobs Lambda functions. • AWS fully

    managed polling. Event-driven. • Maximum 12 retries. Per job configurable. • Mirror Sidekiq's retry backoff timing. • Last retry is at 11 hours 30 minutes. • Supports ActiveJob's wait/delay. Up to 15 minutes. • Dead messages are stored for up to 14 days. ActiveJob on SQS & Lambda https://github.com/customink/lambdakiq 36
  10. Scalable compute should be easy. Not about Lambda v. Kubernetes.

    Easy compute will be our future. Firecracker is still leading. 49
  11. Do not try to out-engineer AWS Partner with them. Apply

    minimal spackle to fill any process/tech gaps. Happily delete your workarounds. 50
  12. 53