Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1
T r e x E d g e
I t a r u O g a w a
2
P r o f i l e
rt
d
/ 7 24 /
eE MA
x cdW x 61
g OS T
0 P EHC
J E
@ogawatachi itaru.ogawa @ogawatachi
3
4
Innovation local with IT
5
S m a r t V i l l a g e
IoT
AI
Digital Twin
6
7
S m a r t V i l l a g e
N A R .( )7A 1 02 W
9 L 7 /
8
L o R a W A N
5 mA 2W
m
G
2
kR2 . 2
1 A L o2LoRaWAN
IoT
A
2 a A N
9
10
11
FIT
12
13 FIT
14
FIT
15
F I T
O&M
2017
16
F I T
O&M
2017
17
FIT
•
•
•
•
•
•
•
•
•
•
•
• PCS
18
19
PC
5
A
D
Y
W
/
/
20
A
B
C
21
Microservices Pattern
API
22
l 3 4
l 2 ( 30 )
l 1 API 63
l 1 10 500
l Lambda Node.js 6.10
l ServerlessFramework v1.25.0
l SPA React + Redux
23
AWS cloud
A
B
C
D
Cognito
/
API Gateway Lambda Dynamo
SPACloudFront
Step Functions
DynamoDB
Streams
Lambda
24
M i c r o s e r v i c e s P a t t e r n
Serverless Code Patterns
https://serverless.com/blog/serverless-architecture-co...
25
get
put
delete
post
26
l serverless.yml
l ServerlessFramework CloudFormation
CloudFormation
200
l serverless-offline `sls
offline start`
l Loc...
27
get
put
delete
post
get
put
delete
post
get
put
delete
post
get
put
delete
post
•
• w
get
put
delete
post
https://hogeh...
28
A P I
get
put
delete
post
get
put
delete
post https://hogehoge1.execute-api.ap-northeast-1.amazonaws.com/prd
https://ho...
29
A P I
• ServerlessFramework serverless-domain-manager APIG
•
https://serverless.com/blog/api-gateway-multiple-services/
30
A P I
• serverless-domain-manager
31
•
• /orgs/ ID/facilities
• /orgs/ ID/pcs
• /orgs/ ID/powercompanies
API
• /facilities
• /pcs
• /powercompanies
32
I D
• Cognito ID
– Cognito
– ID ID
• JWT Lambda
– event.requestContext.authorizer.claims.Cognito Cognito
– Dynamo
ID 12...
33
•
34
API Gateway Lambda DynamoDAX
• Amazon DynamoDB Accelerator (DAX) APIG
• DAX 3 APIG
• URL serverless.yml
• Serverless AP...
35
serverless-plugin-bind-deployment-id
URL
serverless-plugin-bind-
deployment-id serverless-domain-manager
36
get
put
delete
post
get
put
delete
post https://hogehoge1.execute-api.ap-northeast-1.amazonaws.com/prd
https://hogehoge...
37
R e g i o n a l E n d p o i n t
• API EC2
API
API
Amazon
CloudFront
API
CloudFront
API Gateway API
AWS
https://stackove...
38
• "serverless-domain-manager": "^2.1.0"
– APIG
• "serverless-plugin-aws-alerts": "^1.2.4”
– Lambda SNS
• "serverless-pl...
39
Upcoming SlideShare
Loading in …5
×

JAWS DAYS 2018

883 views

Published on

JAWS DAYS 2018
[X-Tech] 農業と太陽とサーバレス(EnergyTech)で発表時に使った資料です。
https://jawsdays2018.jaws-ug.jp/session/449/

Published in: Technology
  • Be the first to comment

JAWS DAYS 2018

  1. 1. 1 T r e x E d g e I t a r u O g a w a
  2. 2. 2 P r o f i l e rt d / 7 24 / eE MA x cdW x 61 g OS T 0 P EHC J E @ogawatachi itaru.ogawa @ogawatachi
  3. 3. 3
  4. 4. 4 Innovation local with IT
  5. 5. 5 S m a r t V i l l a g e IoT AI Digital Twin
  6. 6. 6
  7. 7. 7 S m a r t V i l l a g e N A R .( )7A 1 02 W 9 L 7 /
  8. 8. 8 L o R a W A N 5 mA 2W m G 2 kR2 . 2 1 A L o2LoRaWAN IoT A 2 a A N
  9. 9. 9
  10. 10. 10
  11. 11. 11 FIT
  12. 12. 12
  13. 13. 13 FIT
  14. 14. 14 FIT
  15. 15. 15 F I T O&M 2017
  16. 16. 16 F I T O&M 2017
  17. 17. 17 FIT • • • • • • • • • • • • PCS
  18. 18. 18
  19. 19. 19 PC 5 A D Y W / /
  20. 20. 20 A B C
  21. 21. 21 Microservices Pattern API
  22. 22. 22 l 3 4 l 2 ( 30 ) l 1 API 63 l 1 10 500 l Lambda Node.js 6.10 l ServerlessFramework v1.25.0 l SPA React + Redux
  23. 23. 23 AWS cloud A B C D Cognito / API Gateway Lambda Dynamo SPACloudFront Step Functions DynamoDB Streams Lambda
  24. 24. 24 M i c r o s e r v i c e s P a t t e r n Serverless Code Patterns https://serverless.com/blog/serverless-architecture-code-patterns/
  25. 25. 25 get put delete post
  26. 26. 26 l serverless.yml l ServerlessFramework CloudFormation CloudFormation 200 l serverless-offline `sls offline start` l Local serverless.yml l serverless.yml APIG APIG root l serverless.yml serverless.yml API Dynamo SNS Lambda DynamoDB Local seed serverless-offline yml
  27. 27. 27 get put delete post get put delete post get put delete post get put delete post • • w get put delete post https://hogehoge1 .execute-api.ap- northeast- 1.amazonaws.com/prd https://hogehoge2 .execute-api.ap- northeast- 1.amazonaws.com/prd https://hogehoge3 .execute-api.ap- northeast- 1.amazonaws.com/prd https://hogehoge4 .execute-api.ap- northeast- 1.amazonaws.com/prd https://hogehoge5 .execute-api.ap- northeast- 1.amazonaws.com/prd
  28. 28. 28 A P I get put delete post get put delete post https://hogehoge1.execute-api.ap-northeast-1.amazonaws.com/prd https://hogehoge2.execute-api.ap-northeast-1.amazonaws.com/prd CloudFront • CloudFront • WAF • CloudFront
  29. 29. 29 A P I • ServerlessFramework serverless-domain-manager APIG • https://serverless.com/blog/api-gateway-multiple-services/
  30. 30. 30 A P I • serverless-domain-manager
  31. 31. 31 • • /orgs/ ID/facilities • /orgs/ ID/pcs • /orgs/ ID/powercompanies API • /facilities • /pcs • /powercompanies
  32. 32. 32 I D • Cognito ID – Cognito – ID ID • JWT Lambda – event.requestContext.authorizer.claims.Cognito Cognito – Dynamo ID 123 ID 456 ID 123 ID 456 ID 789
  33. 33. 33 •
  34. 34. 34 API Gateway Lambda DynamoDAX • Amazon DynamoDB Accelerator (DAX) APIG • DAX 3 APIG • URL serverless.yml • Serverless API Stage plugin URL
  35. 35. 35 serverless-plugin-bind-deployment-id URL serverless-plugin-bind- deployment-id serverless-domain-manager
  36. 36. 36 get put delete post get put delete post https://hogehoge1.execute-api.ap-northeast-1.amazonaws.com/prd https://hogehoge2.execute-api.ap-northeast-1.amazonaws.com/prd CloudFront • APIG CloudFront APIG CloudFront •
  37. 37. 37 R e g i o n a l E n d p o i n t • API EC2 API API Amazon CloudFront API CloudFront API Gateway API AWS https://stackoverflow.com/questions/47104118/regional-api-gateway-with-cloudfront
  38. 38. 38 • "serverless-domain-manager": "^2.1.0" – APIG • "serverless-plugin-aws-alerts": "^1.2.4” – Lambda SNS • "serverless-plugin-bind-deployment-id": "^1.0.1” – ID • "serverless-plugin-warmup": "^3.3.0-rc.1” – Lambda • "serverless-prune-plugin": "^1.3.0" – • "serverless-webpack": "4.0.0” – Webpack • "serverless-dynamodb-local": "0.2.26” – Local DynamoDB • "serverless-offline": "3.16.0” – Lambda APIG
  39. 39. 39

×