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の組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
Search
shiro seike
PRO
July 12, 2024
Programming
2
360
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
技術力を高め合う “開けた”企業間コミュニティの形成 / Formation of an "open" inter-company community to enhance technological capabilities
seike460
PRO
1
74
有効な使い方を正しく理解して実装する PHP8.3の最新機能の「ウラ側」 / Understanding and Implementing Effective Usage Correctly The "Uraside" of PHP 8.3's Latest Features
seike460
PRO
1
98
有効な使い方を正しく理解して実装する PHP8.3の最新機能 / Proper understanding and implementation of effective usage Latest features in PHP 8.3
seike460
PRO
2
310
事例から見るサーバーレスの効果 / Serverless Effectiveness as Seen in Case Studies
seike460
PRO
1
100
Secure Serverless Architecture
seike460
PRO
2
600
地方こそサーバーレス、その意義に迫るサーバーレスPHP / Serverless PHP: The Rural Areas, and Why Serverless PHP Matters
seike460
PRO
2
200
サーバーレスらしさを意識した AWSにおける開発手法 / Development methodologies in AWS that are serverless-like
seike460
PRO
1
83
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
3
520
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
190
Other Decks in Programming
See All in Programming
240802 INFCON
hajoeun
1
470
Kubernetesでやる省エネスケジューリング / Kubernetes Meetup Tokyo #66
ebiiim
0
430
SLO導入と Datadog SLO Dashboard / SLO introduction and Datadog SLO Dashboard
honyanya
0
240
ESLint Rule により事業, 技術ドメインに沿った制約と誓約を敷衍させるアプローチのすゝめ
shinyaigeek
0
200
Uncharted packages (Laravel Live Denmark)
freekmurze
0
120
Generate a rust client code by OpenAPI Generator
matsu7874
0
140
「引き算」で高めるアジリティ / Enhancing Agility through Subtraction
jaguar_imo
3
170
LLMとSLMを活用!Azure Functions × モダンフロントエンドでつくる次世代アプリケーション
nahokoxxx
1
980
めざせ!WKWebViewマスター! / WKWebView Master
marcy731
2
110
スタートアップの急成長に寄り添うOn-Call体制構築とその変遷
horimislime
3
1.3k
[INFCON 2024] 7년 동안 하나 만들었습니다
hiddenest12
0
820
watsonx.ai Dojo #1 生成AIと向き合うための準備編
oniak3ibm
PRO
0
400
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
32
1.7k
Principles of Awesome APIs and How to Build Them.
keavy
124
16k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
RailsConf 2023
tenderlove
26
780
Dealing with People You Can't Stand - Big Design 2015
cassininazir
361
22k
What's new in Ruby 2.0
geeforr
339
31k
A Philosophy of Restraint
colly
202
16k
Designing with Data
zakiwarfel
97
5k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.2k
For a Future-Friendly Web
brad_frost
173
9.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
652
58k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠