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
多分わかるServerless Framework
Search
astolfo
February 26, 2021
Programming
0
410
多分わかるServerless Framework
astolfo
February 26, 2021
Tweet
Share
More Decks by astolfo
See All by astolfo
最近のフレッツとIPv6の話
mattenn
2
730
そうだ、10Gを引こう
mattenn
0
240
COCOAを使用した人数表示システムの開発
mattenn
0
150
すぐに使える 説明下手エンジニアのための コミュ力入門
mattenn
0
260
Cloudflare Mail Routingを使ってみた
mattenn
0
290
Realforceを濡らしてしまった話
mattenn
0
270
DJを陰で支える技術
mattenn
1
1.2k
それNetlifyでできるよ - Webページを爆速で作ってキレイに魅せよう
mattenn
8
11k
多分分かるUSB Type-C
mattenn
0
660
Other Decks in Programming
See All in Programming
Rubyのobject_id
qnighy
6
1.3k
開発を加速する共有Swift Package実践
elmetal
PRO
0
420
What is Parser
yui_knk
9
4.1k
What you can do with Ruby on WebAssembly
kateinoigakukun
0
170
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
180
Developer Joy == Developer Productivity (really!)
hollycummins
1
220
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
650
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
680
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
170
マルチモジュールにおけるテスト最適化
fxwx23
0
210
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
Producing Creativity
orderedlist
PRO
340
39k
The Invisible Side of Design
smashingmag
296
50k
RailsConf 2023
tenderlove
28
810
Making the Leap to Tech Lead
cromwellryan
128
8.8k
For a Future-Friendly Web
brad_frost
174
9.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
47
48k
Optimizing for Happiness
mojombo
375
69k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Side Projects
sachag
451
42k
Done Done
chrislema
180
16k
Transcript
ଟΘ͔Δ Serverless Framework ARCANA Meetup Nakao Takamasa
ࠓճͷझࢫ • αʔόʔϨεԿͳͷ͔ɺͦͯ͠Ͳ͏͍͏࣌ʹʹཱͭͷ͔ཧղͰ͖ ΔΑ͏ʹͳΔ • Serverless FrameworkͱLambda͕ͳΜͳͷ͔গ͠ͰཧղͰ͖ΔΑ ͏ʹͳΔ • جૅͷجૅΛ͠·͢
• AWS͕བྷΈ࢝ΊΔͱ͜Ζ·Ͱ͠·ͤΜ
΅͘ ͠͝ͱ ɾLaravelͱJQueryͰԥΓ͢ ࠓقΞχϝ ɾͷΜͷΜͼΑΓΛ؍͍ͯ·͢
ʮࠓ൩ͷΞχϝͳΜ͚ͩͬʯ
SlackͷbotΛ࡞Γ·ͨ͠
̍̍ճ͔͠ಈ͔ͳ͍ίʔυര
͔͠͠ɺPCʹίʔυ͕͋ΔͷͰPCΛด͡Δͱ ಈ͍ͯ͘Ε·ͤΜ
ͳͷͰαʔόͰಈ͔͠·͠ΐ͏
αʔόͰಈ͔͠·͠ΐ͏ • దͳαʔό(VPS)Λܖ͠·͢ • SSHsudo·ΘΓͱ͍ͬͨUNIXؔ࿈ͷઃఆΛ͠·͢ • npmΛೖΕ·͢ • Node.jsΛೖΕ·͢ •
ϑΝΠϧΛSFTPͱ͔Ͱసૹ͠·͢ • CronͰఆظతʹಈ͘Α͏ʹ͠·͢
͜ͷํ๏ʹ՝͕͋Δ
՝ • ίʔυΛಈ͔͍͚ͨͩ͠ͳͷʹLinuxͷߏஙΛͯ͠Δ • Πϯϑϥࣝͷͳ͍ํʹͱͬͯॳݟࡴ͠ • ಈ͍͍ͯͳ͍࣌ؒ՝ۚ͞Ε͍ͯΔ • 11ඵ͚ͩಈ͘ίʔυ͕͋ͬͨΒΓͷ࣌ؒͷ՝ۚ…
࣮͞Εͨӡ༻
ސ٬͕ຊʹ ඞཁͩͬͨͷ ࣮͞Εͨӡ༻
Lambda • AWS͕ఏڙ͢ΔɺίʔυΛ࣮ߦͯ͘͠ΕΔͭ • ͱΓ͋͑ͣjs͕ಈ͘ڥΛ͘ΕΔ • 1ϛϦඵ͋ͨΓͰ՝ۚ͞ΕΔ • 0.0000000021USD •
·͔͔͋࣌ؒͬͯߴ͘ͳ͍ΑͶ
• MicrosoftʮαʔόϨεͳAzure FunctionsϦϦʔε͠·͢ʯ • IBMʮαʔόϨεͳIBM Cloud FunctionsϦϦʔε͠·͢ʯ • GoogleʮαʔόϨεͳGoogle Cloud
FunctionsϦϦʔε͠·͢ʯ
‧⛺è䡢(’ω’)䡢è⛺䡡‧ ͏Θ͋͋͋͋͋͋͋͋͋͋͋͋
αʔϏε͝ͱʹίϚϯυ֮͑ΜͷͭΒ͍͠ แׅతʹͳΜ͔ͬͯ͘ΕΔͷͳ͍ͷ͔…
͋ΔΜͩͳͦΕ͕
Serverless Framework • ࠓͷຊ • αʔόʔϨεܥͷߏΛָʹཧͯ͘͠ΕΔπʔϧ • ָʢ؆୯ͱݴͬͯͳ͍ʣ
Serverless Frameworkͷಋೖ • NpmΛಋೖ͍ͯ͠ΔڥͰҎԼͷίϚϯυΛୟ͘ • ؆୯Ͱ͢Ͷ
ϓϩόΠμʔΞΧϯτͷઃఆ • Serverless Framework֤αʔόʔϨεαʔϏεΛแׅͯ͘͠ΕΔ ͭͳͷͰɺʮAWSͷLambdaͰΔͱ͖͜ͷAPIΩʔͬͯͶʯͱ ࣄલʹઃఆͯ͋͛͠Δඞཁ͕͋Δ • APIΩʔͷൃߦ͕ඞཁͳͷͰAWSͳΒϧʔτϢʔβʔͰೖͬͯIAM ϢʔβʔΛ৽ن࡞͓ͯ͘͠
ϓϩδΣΫτͷ࡞
ϓϩδΣΫτͷ࡞ σΟϨΫτϦΛ࡞Δ
ϓϩδΣΫτͷ࡞ BXTͷMBNCEBͰ/PEFKTΛ ͏ͱ͖ͷςϯϓϨʔτ ໊લ
࡞Δ • ಈ͔͍ͨ͠ίʔυΛ͕Γ͕Γॻ͘
࡞Δ • ͍͍Ͱ͢Ͷ
ิࣄ߲ • ڥมserverless.ymlͰߦ͏ • API GatewayͷઃఆͳͲ͜͜Ͱߦ͏
σϓϩΠ • sls deployͰOK • ϥΠϒϥϦΑ͠ͳʹ ͯ͘͠ΕΔ • ZIPͰݻΊͯS3ʹ্͛ͯ CFnͰల։͢Δ·Ͱશ
ࣗಈͰ͢Δ
• ʮServerless Frameworkͷ΄͏͕ͦ͠͏ʹݟ͑ΔΜ͚ͩͲʯ • ʮ͜ΕΘͣʹLambdaͰͬͨ΄͏ָ͕ͳΜ͡Όͳ͍ͷʯ
ಉ͜͡ͱΛLambdaͰΔ߹ • σΟϨΫτϦΛzipͰѹॖ͢Δʢnode_modulesͦͷ··Ͱྑ͍ʣ • AWSͷϚωδϝϯτ ίϯιʔϧΛ։͖ɺlambdaΛ։͘ • ֘ϓϩδΣΫτΛબ • ZipΛΞοϓϩʔυ
͜͏ͳΓ͔Ͷͳ͍ͷͰ͓͢͢Ί͠·ͤΜ
·ͱΊ • Serverless FrameworkLambda”ͳͲ”ͷαʔόʔϨεΞʔΩςΫ νϟΛָʹѻ͑ΔϑϨʔϜϫʔΫ • AWSͷ߹APIͷઃఆͳͲࣗಈԽͰ͖ΔͨΊɺϙνϙνૢ࡞͢Δ ख͕ؒҰؾʹল͚Δ
ऴΘΓ