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
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Qdrantでベクトルデータベースに入門してみよう
iwatatomoya
0
320
詳解 AWS Lambdaコールドスタート
iwatatomoya
1
1.8k
真のサーバーレスへ向けたAuroraの進化Aurora Limitless Database
iwatatomoya
1
4.5k
AWS SDKのClientはFactory経由で作ろう
iwatatomoya
1
710
OpentelemetryでアプリケーションのObservabilityを強化しよう
iwatatomoya
0
930
AWS Lambdaは俺が作った
iwatatomoya
2
2.2k
SnapStartの未来についての期待と妄想
iwatatomoya
1
1.3k
実例から学ぶ! AWSを活用したシステム開発の勘所
iwatatomoya
1
3k
Other Decks in Technology
See All in Technology
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
ハイテク休憩
sat
PRO
2
150
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
560
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
12
11k
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
.NET 9 のパフォーマンス改善
nenonaninu
0
930
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
250
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
100
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
340
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
160
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Optimising Largest Contentful Paint
csswizardry
33
3k
Scaling GitHub
holman
458
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The World Runs on Bad Software
bkeepers
PRO
65
11k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
How GitHub (no longer) Works
holman
311
140k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
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