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
今からでも遅くない_基礎から学ぶサーバーレス開発_-キホンの_キ_-.pdf
Search
TomoyaIwata
October 05, 2018
Technology
3
5k
今からでも遅くない_基礎から学ぶサーバーレス開発_-キホンの_キ_-.pdf
2018/10/5に開催されたDevelopers.IO 2018で登壇した際の資料です
TomoyaIwata
October 05, 2018
Tweet
Share
More Decks by TomoyaIwata
See All by TomoyaIwata
Qdrantでベクトルデータベースに入門してみよう
iwatatomoya
0
200
詳解 AWS Lambdaコールドスタート
iwatatomoya
1
1.6k
真のサーバーレスへ向けたAuroraの進化Aurora Limitless Database
iwatatomoya
1
4.4k
AWS SDKのClientはFactory経由で作ろう
iwatatomoya
1
690
OpentelemetryでアプリケーションのObservabilityを強化しよう
iwatatomoya
0
900
AWS Lambdaは俺が作った
iwatatomoya
2
2.2k
SnapStartの未来についての期待と妄想
iwatatomoya
1
1.3k
実例から学ぶ! AWSを活用したシステム開発の勘所
iwatatomoya
1
3k
目指せ完全制覇!3大クラウドの認定資格制度と勉強方法について
iwatatomoya
0
9.2k
Other Decks in Technology
See All in Technology
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
600
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
200
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Featured
See All Featured
How GitHub (no longer) Works
holman
310
140k
Designing Experiences People Love
moore
138
23k
Building Adaptive Systems
keathley
38
2.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Fireside Chat
paigeccino
34
3k
Docker and Python
trallard
40
3.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
A better future with KSS
kneath
238
17k
BBQ
matthewcrist
85
9.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Transcript
- -
& .-* (2 ,0'/4"# 51 83;7 +)
!&%$9( 6: Attention
3 /1) l ( l20185 l'5Sier l#. &! l#.
(C/S+LAMP+) l"%AWS$-3 l2* , 04
4 :@" 2-1AWS.8 4 9;=&#IaaS6 •57*3!%( •$'><+
) •$'0, :) !" ?/
5 26 • !-4'$ 18 8( • &
# • & • ,/ & +)07 *. • & % " 35 • 8( 5( 5( 8( 3(
6 26 • !-4'$ 18 8( • &
# • & • ,/ & +)07 *. • & % " 35 • 8( 5( 5( 8( 3(
7 6/" F>- # $BDGH &
+1 $BD ?,GH ! .@ ;5 ! 6/"82 ( 3 $BD GH ! .@ E07: "82( ! )* ! .@ % F>"9 ( 4A C=<'
8 *% 510 $! )
1" 2" 3" 4" 5" &#' (, + (,
9 −
0 10 20 30 40 50 60 70 80 90 100 0:00 2:00 4:00 6:00 8:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 0 10 20 30 40 50 60 70 80 90 100 0:00 2:00 4:00 6:00 8:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 3 1
10 −
11 − ' ! ) 1 2 3 4
5 -, #= %( -* ./ +"&$ +" +"
12 • $/ • +-
%(&1. • 2* )' • 2*#0 )! 2* ", 2* ",
13 − '$%*! ' $%# )" 0:00 2:00 4:00
6:00 8:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 '&( !
14 − 1 2 3 4 5 $"
= $" ! $" #
0:00 2:00 4:00 6:00 8:00 10:00 12:00 14:00 16:00 18:00
20:00 22:00 & 15 − ! % $#" & "
16 • ! /)- • 90(,7/)-
• $1485 • OS&%"/). • *3(6' . # +2 # +2
17 OS
18
19 26 • !-4'$ 18 8( • &
# • & • ,/ & +)07 *. • & % " 35 • 8( 5( 5( 8( 3(
20
21 • # >:A9; ) %, • (H ID)OS'
* "0< F: ) %, &! # • *45 B/ • $+)(7.45 3 B/ G;ECB/ • ) %,? 61 J-8 • 61 *$ 2@:=
22
OS
23 https://aws.amazon.com/jp/lambda/pricing/ • *(+.) • ! * • 1,000,000
$ (' • 1,000,000 $ $0.2 (MB) 1 ('" -)! 100 ),#%& (USD) 128 3,200,000 0.000000208 192 2,133,333 0.000000313 256 1,600,000 0.000000417 AWS Lambda
24 • •
25 − AWS Lambda Amazon DynamoDB Amazon
API Gateway Amazon S3 AWS, ./$+( '96172- ! FaaS(Function As a Service) API 96@F3D>A3; ! 2B=? )#<: *! E0Web %+ 84 ")& C NoSQL! 2B=5? )#*84
26 − AWS IoT Amazon Kinesis Amazon
Cognito Amazon CloudFront S Akt C A S e S b DAl C N ( S N A o ( ( ) ( ( N vA r n W i l w A
27 !
28
29 • !*3=$ 541!*3< • ( " />7@;6 !*
2. 90 -OK • #)'+*% &) ,B?: !* 8&) AC
30
31 lLambda 5)%& .#5$ lLambda;1(7,630 lDynamoDB ""4 lLambda
9 /* AWS ! 8:2 +-' /*
32
33 ;B" AWS0? 4 8<>*# IaaS6 •
'3@-%*:D 8. • $,) • $, • 27$, 1/ 9 C 05 • $,&+!( "=A • 8. 5. 5. 8. 3.
34
35 − • IoT' $% " •
# • !& IoT' $% "
36 − SPA <,$ :3Web#(&+ 86.3API*%+4 "'7
- • ++0 =/ !) Web 12 • 7API5; 9 SPA(Single Page Application) API
37 − • $*% 137 &. •
AWS "; +/0( • #9):8 6, AWS54 !)'-2
38
39 − RDB% "&'$ RDB
RDB! #
40 − • %(5)! •#' &
" $
-" #(. '$ +! Lambda ,* 41
− &*%) Lambda-"
42 •!( @@@@$+ •!( @@
•!( ",) DL(SPA) •!( AWS'&#-%. •!( •!( /* ETC
43 IoT
44 26 • !-4'$ 18 8( • & #
• & • ,/ & +)07 *. • & % " 35 • 8( 5( 5( 8( 3(
45 https://github.com/aws-samples/aws-iot-chat-example/ Demonstration AWS IoT Chat Application
46 IoT policy IoT Rule AWS Lambda Amazon S3
Amazon Cloudfront Amazon API Gateway AWS Cognito Amazon DynamoDB Identity Provider
47 https://www.iwata.classmethod.info/
48 l&2479UO l,#B300A/3 l"'*B1A0/3 10604/3N<C> l)!: 5KB(.$ lQ%-62m5.large/
/ FK@ lQ%-62%1F 30GB#- K@ l5?,+/H1R> lMHTJ;S1G= ;S IP 8ELD
49 () Amazon EC2
1,440 $0.124/1 $178.56 Amazon EC2 14GB $0.114/1GB $1.596 EBS 60GB $0.12/1 $7.12 :$187.276
50 () AWS IoT
600 $1.5/100 $7.5 Dynamo DB 10WCU $0.000742/ $5.3424 Dynamo DB ! 10RCU $0.0001484/ $1.06848 :$13.91
51 $187.276 - $13.91 = $173.366 92%
52 26 • !-4'$ 18 8( • & #
• & • ,/ & +)07 *. • & % " 35 • 8( 5( 5( 8( 3(
53 • Lambda • Lambda
54 SAM (Serverless
Application Model) Serverless Framework APEX
55 • !$(,' .- 1
• ' "# *0)&/+%
56 SAM CLI LocalStack PostMan DynamoDB
local AWS BA%&)" *(!"BA?G AWS59 ( .; 7@ *(BA !$/, =8 Web API!"62 ( -4 APIF+ '"1E !"C<0 *(BA DynamoDB%&)" AWS59 ( *(BA AWS:D#%&)" ( 3 AWS#.; H >
57 ':, *A? /3 • =7>9B UnitC (
"();2 • AWS! #, (&-7>+$ * '52 ,*A? 03 /3 • curl%- Postman;2 • AWS! ' 2 *;2 AWSA? 03 /3 • 18 AWSA? #, • .@A?D< 46 E
58 ! " $#
59 •# •"&! •"& $"&
%
60 98%<+? # #$):&- ):&(,# #$)
:&430 @. *2 57' !">= 61;1 & /( ) https://github.com/spulec/moto
61 ,&10.87 " (3*$ +) •
Web • • DB • A • Lambda1 • B • Lambda2 • C 2%# %# '546-/!
62 l(# !"6C ,A-FW$ )
24 l. 8PJ>/@ :< l%'&*1?3B=; $) 70 FW+ 95
63 04 • !,2'$ /6 8( • & #
• & • +- & *).5 • & % " 13 • 8( 5( 5( 8( 3(
64 & 61 + !"- 8 1
$5# *)'7 2 32 ,/(4 0%. 3
65 ' "& % !# $
66