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.5k
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
55
The Rise of AI Copilots
metaskills
0
130
Real-World AI Automation with Lambda & Bedrock
metaskills
0
110
The Lambda Sidecar Pattern for Event-Driven Kubernetes
metaskills
0
370
The Case for Rails on Lambda v1
metaskills
0
690
Learn to Program The Cloud with Ruby & AWS Lambda
metaskills
0
78
Full-Stack to Functions & Back Again
metaskills
0
320
Turbo Applications - Winning with Ajax + pushState + Rails
metaskills
0
290
Modular CSS & Sass
metaskills
1
170
Other Decks in Programming
See All in Programming
人には人それぞれのサービス層がある
shimabox
3
470
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
230
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
670
JVM の仕組みを理解して PHP で実装してみよう
m3m0r7
PRO
1
250
クラシルリワードにおける iOSアプリ開発の取り組み
funzin
1
810
MLOps Japan 勉強会 #52 - 特徴量を言語を越えて一貫して管理する, 『特徴量ドリブン』な MLOps の実現への試み
taniiicom
2
570
Parallel::Pipesの紹介
skaji
2
870
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
TypeScriptのmoduleオプションを改めて整理する
bicstone
4
430
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
120
Feature Flag 自動お掃除のための TypeScript プログラム変換
azrsh
PRO
4
630
Efficiency and Rock 'n’ Roll (Really!)
hollycummins
0
600
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Fireside Chat
paigeccino
37
3.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
The Cult of Friendly URLs
andyhume
78
6.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Raft: Consensus for Rubyists
vanstee
137
7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
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