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
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / C...
Search
shiro seike
PRO
July 12, 2024
Programming
2
600
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
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
(再)ひとり技術広報からの脱却 / Re:Breaking away from one-man technical public relations
seike460
PRO
1
140
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
880
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
260
AWS reInvent 2024サービスアップデートデモ / AWS reInvent 2024 Service Update Demo
seike460
PRO
0
43
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
620
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.2k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
380
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
650
Other Decks in Programming
See All in Programming
ソフトウェアエンジニアの成長
masuda220
PRO
12
1.7k
Immutable ActiveRecord
megane42
0
140
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Open source software: how to live long and go far
gaelvaroquaux
0
640
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Grafana Cloudとソラカメ
devoc
0
170
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
120
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
250
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
130
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
750
DROBEの生成AI活用事例 with AWS
ippey
0
130
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
A Tale of Four Properties
chriscoyier
158
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Automating Front-end Workflow
addyosmani
1368
200k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠