Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / C...
Search
shiro seike
PRO
July 12, 2024
Programming
2
520
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
第36回 JAWS-UG札幌 勉強会【 #CloudflareUG_cts と合同開催です!】
https://jawsug-sapporo.connpass.com/event/321565/
shiro seike
PRO
July 12, 2024
Tweet
Share
More Decks by shiro seike
See All by shiro seike
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
470
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.1k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
340
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
580
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
740
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
1.9k
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
180
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
120
AWS X-Rayを利用したサーバーレスのパフォーマンス分析 / Serverless performance analysis using AWS X-Ray
seike460
PRO
2
180
Other Decks in Programming
See All in Programming
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
7
3.4k
cmp.Or に感動した
otakakot
3
340
CSC305 Lecture 25
javiergs
PRO
0
120
AWS認定資格を勉強した先に何があったか
satoshi256kbyte
2
190
Seamless Flutter Native Integration: FFI & Pigeon - Dreamwalker (JaichangPark / 박제창) @FlutterKaigi2024
itsmedreamwalker
0
120
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
110
Serverless苦闘史
mosh_inc
0
140
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
0
3.1k
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
760
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
760
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
810
新規学習のハードルを下げる方法とは?/ How to Make Learning Something New Easier?
nobuoooo
1
130
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
110
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Navigating Team Friction
lara
183
15k
Fireside Chat
paigeccino
34
3.1k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Statistics for Hackers
jakevdp
796
220k
Done Done
chrislema
181
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Bash Introduction
62gerente
608
210k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
410
Site-Speed That Sticks
csswizardry
1
150
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
©Fusic Co., Ltd. 1 Cloudflare Workers x AWS Lambdaͷ Έ߹ΘͤϢʔεέʔε
2024.07.12 @seike460 ୈ36ճ JAWS-UGࡳຈ ษڧձ ʲ #CloudflareUG_cts ͱ߹ಉ։࠵Ͱ͢ʂʳ
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ @seike460 AWS Community Builder
Serverless ίϛϡχςΟ JAWS-UG Fukuoka Cloudflare Meetup Fukuoka Serverless Meetup Fukuoka Fukuoka.php Fukuoka.go JP_Stripes Fukuoka ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. AWSʹ͓͚ΔαʔόʔϨεͷඪ४ߏ 2. Amazon
API Gatewayͷίετ 3. Cloudflare Workersͷར༻ 4. ͞ΒͳΔ͕Γ 5. ·ͱΊ
©Fusic Co., Ltd. 4 AWSʹ͓͚ΔαʔόʔϨεͷඪ४ߏ 1
©Fusic Co., Ltd. 5 Α͋͘Δߏ API Gateway͕ϦΫΤετΛड͚ͯ AWS Lambda͕ϦΫΤετΛॲཧ͢Δ ར༻͢Δʹશ͘ͳ͍͠
࣮͢Δ͏͑Ͱͷϋʔυϧ શ͘ߴ͘ͳ͍ͷͰ ඇৗʹඪ४తͳߏͩͱࢥ͍·͢
©Fusic Co., Ltd. 6 Amazon API Gatewayͷίετ 2
©Fusic Co., Ltd. 7 Amazon API GatewayҎ֎ʹߴ͍ ͍ͭ͜ͷجຊߏͰಈ͍͍ͯͨ APIʹ1000ສϦΫΤετ͕ ߦΘΕ͍ͯΔࣄྫʹͯ
શମίετͷͳΜͱ76.4%͕ Amazon API Gatewayͱ͍͏ ঢ়ଶʹͳ͍ͬͯͨ ͪΖΜنʹରͯ͠ ଟେͰͳ͍ͷ͕ͩɺͨΒཱͭ
©Fusic Co., Ltd. 8 Cloudflare Workersͷར༻ 3
©Fusic Co., Ltd. 9 ઌߦ࣮ ͦ͏͍͑1͋ͨΓ10ສ݅ͷ ϦΫΤετ͕ແྉ͕͋ΔFaaS͕ ͋Δͳͱࢥ͍ͭ͘ લճԬभͰ͓͜ͳΘΕͨ Cloudflare
Meet-up Fukuoka Vol.2 ʹͯ@melank͕ Cloudflare WokersͰHonoΛར༻ͨ͠ Routing࣮Λߦ͍ͬͯͨ
©Fusic Co., Ltd. 10 ࣮ΞʔΩςΫνϟ Cloudflare Woker͕ϦΫΤετΛड͚ͯ AWS LambdaʹͦͷϦΫΤετΛ͠ AWS
Lambda͕ϦΫΤετΛॲཧ͢Δ ͦͷॲཧ݁ՌΛCloudflare Woker͕ฦ͢
©Fusic Co., Ltd. 11 αΫοͱίʔυΛॻ͍ͯΈΔʢCloudflare Workersʣ Cloudflare WorkersଆͰ RequestΛड͚औͬͯ ͦͷRequestΛར༻ͯ͠
AWS LambdaΛݺͼग़࣮͢ ʢݺͼग़࣌͢Invoke͢Δʣ
©Fusic Co., Ltd. 12 ֦େʢCloudflare Workersʣ
©Fusic Co., Ltd. 13 αΫοͱίʔυΛॻ͍ͯΈΔʢAWS Lambdaʣ Cloudflare WorkersଆͰ RequestΛड͚औͬͯ ͦͷRequestΛར༻ͯ͠
AWS LambdaΛݺͼग़࣮͢ ʢݺͼग़࣌͢Invoke͢Δʣ
©Fusic Co., Ltd. 14 ֦େʢAWS Lambdaʣ
©Fusic Co., Ltd. 15 ύϑΥʔϚϯε Time per Request͕ 200msͳͷͰ ͔ͳΓݱ࣮తͳύϑΥʔϚϯε
ʢΉ͠Ζૣ͍ʣ 500 rpsͱ͍͏͜ͱͰ ฒྻੑ֬อ͞Ε͍ͯΔ API Gatewayͱͯ͠ेͳੑೳ
©Fusic Co., Ltd. 16 ύϑΥʔϚϯε
©Fusic Co., Ltd. 17 ͞ΒͳΔ͕Γ 4
©Fusic Co., Ltd. 18 API Gatewayʹ࣮Ͱ͖ͳ͍ػೳ࣮Մೳʹ Honoࣗମʹ༷ʑͳMiddlewareػߏΛ ఏڙ͍ͯ͠Δ ྫ͑JWTೝূɺCSRFରԠɺ StreamingDataରԠͳͲ
༷ʑͳػೳՃΛखܰʹ࣮ࢪग़དྷΔ Ͳ͏ͯ͠ߏஙͷίετΛͭ ඞཁ͋Δ͕ߏஙίετ͕༩͢Δ ՁΛڗड͢ΔʹબࢶʹͳΔ͔
©Fusic Co., Ltd. 19 ·ͱΊ 5
©Fusic Co., Ltd. 20 ·ͱΊ Α͋͘ΔAWSͷαʔόʔϨεߏͰҊ֎API Gatewayͷֹ͕͔͔ۚΔ Point 01 ίετ෦ͷղܾͱͯ͠Cloudflare
Wokers x AWS Lambda Point 02 ύϑΥʔϚϯε্ʑɺશ͘ͳ͑͘Δ Point 03 ΧελϚΠζੑʹັྗΛײ͡ΔͷͳΒબࢶʹͳΔ͔͠Εͳ͍ Point 04
©Fusic Co., Ltd. 21 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠