Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS Lambda & Ruby/Rails with SAM
Search
Ken Collins
March 06, 2019
Programming
1
4.3k
AWS Lambda & Ruby/Rails with SAM
Ken Collins
March 06, 2019
Tweet
Share
More Decks by Ken Collins
See All by Ken Collins
Experts.js @ Norfolk.js
metaskills
0
28
The Rise of AI Copilots
metaskills
0
54
Real-World AI Automation with Lambda & Bedrock
metaskills
0
69
The Lambda Sidecar Pattern for Event-Driven Kubernetes
metaskills
0
310
The Case for Rails on Lambda v1
metaskills
0
620
Learn to Program The Cloud with Ruby & AWS Lambda
metaskills
0
64
Full-Stack to Functions & Back Again
metaskills
0
250
Turbo Applications - Winning with Ajax + pushState + Rails
metaskills
0
270
Modular CSS & Sass
metaskills
1
160
Other Decks in Programming
See All in Programming
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
340
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.8k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
480
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
170
C++でシェーダを書く
fadis
6
4k
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
Identifying User Idenity
moro
6
9.6k
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
390
ヤプリ新卒SREの オンボーディング
masaki12
0
110
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
560
色々なIaCツールを実際に触って比較してみる
iriikeita
0
320
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
590
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Side Projects
sachag
452
42k
RailsConf 2023
tenderlove
29
890
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
The Cult of Friendly URLs
andyhume
78
6k
BBQ
matthewcrist
85
9.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
3
77
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Facilitating Awesome Meetings
lara
49
6.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Transcript
AWS Lambda & Ruby/Rails with SAM
Congratulations! The simple fact that you are sitting here listening
to me, means you've made a glorious contribution to Science! Tragic, but informative. Cave Johnson
Ken Collins Staff Engineer @CustomInk @MetaSkills
None
⠀ ⠀ ⠀
KNOWLEDGE Rails & Lambda Ruby & Lambda Tech Intro AWS
SAM Objectives & Results
None
None
Change The World One Lambda at a Time!
Using Ruby with AWS Lambda & SAM https://github.com/757rb/hello-757rb-lambda
Custom Ink | Tech Blog https://technology.customink.com
https://dctechslack.herokuapp.com https://slackin757dev.herokuapp.com DCTech || 757Dev
Tech Intro
Strap Bootstrap your macOS development system. GitHub Project https://github.com/MikeMcQuaid/strap
• ./bin/ • bootstrap, setup, build, server, deploy, test,
… • Usually Bash Strap
AWS Lambda
None
AWS SAM GitHub Project https://github.com/awslabs/serverless-application-model/
$ sam
https://github.com/awslabs/serverless- application-model/blob/master/versions/ 2016-10-31.md
https://docs.aws.amazon.com/ AWSCloudFormation/latest/UserGuide/aws- template-resource-type-ref.html CLOUDFORMATION
$ sam local start-api
$ sam build --use-container
$ sam package … $ sam deploy …
Ruby & Lambda
Project Pillars • Local Development Feedback • Using Gems with
Native Extensions • Using DynamoDB
Contrived Architecture DynamoDB HTTP /plos?query={query}
None
Docker Image lambci/lambda:ruby2.5
Local Dev Deps
Easy Development & Browser Refreshes
Patterns • Directories (app, test, etc) • Lean Handler &
PORO Usage • Debug HTML. Event, Context, & ENV • Minitest, TravisCI, & Capybara* *not really
Aws::Record GitHub Project https://github.com/aws/aws-sdk-ruby-record
DynamoDB
Used in IAM Execution Role DynamoDB
None
Patterns…
None
Patterns • Easy/Lazy Development & Test • Table Migrations •
SimpleTable On Demand Defaults
Using Ruby with AWS Lambda & SAM https://github.com/757rb/hello-757rb-lambda
Rails & Lambda
Product Site http://rubyonjets.com
Ruby on Jets
Ruby on Jets
None
None
None
None
None
None
None
None
None
None
Little Gotcha List • Docker Shared Volume Perf • Logging
& RAILS_LOG_TO_STDOUT • Keeping Package Size Down. • Invoke URL & Custom Domains
None
Coming Soon • Quality Rack Integration. Session, Cookies, & More.
• Deploy asset:precompile to S3. • Encrypted Session Secret via AWS System Manager Param Store. • Better Gemfile dev/test groups.
None
Lambda Layers
--help
None
RailsConf 2019
https://dctechslack.herokuapp.com https://slackin757dev.herokuapp.com DCTech || 757Dev
None