SlideShare a Scribd company logo
1 of 62
Download to read offline
B
2019.05.09
Amazon Web Services Japan K.K.
Akihiro Tsukada, Startup Solutions Architect, Manager
• # # #
• #
• #
# #
2
• D A
R
• A D
• B
3
9 B A 9 t D S p z O
• 9 B A 9 oml a
•
• 9 B A 9 e dg W O
k s n 9 B 0 1 ci[
• - 1 9 .
9 B A 9 2 1 2 p y
• A 9 ] h [| 9 1 1
• A 1 v PL A 9 rsb] 4
S LP D A B [ OL
W
]
5
AWS Lambda
7
AWS Lambda
Amazon RDSAmazon Aurora
Amazon DynamoDB
Amazon ElastiCache Amazon Neptune
...etc
8
., 9 b
AWS Lambda
., @ a D B R
L ., 5
01 2
Amazon
RDS
Amazon
Aurora
9
a S
AWS Lambda
Amazon
RDS
Amazon
Aurora
D L
b L M 1
1 B 1 d
B R B . .
…
!
10
Private subnet
. B a IbD i
L P DN V R S
E D 2 C I
. L P ICE . C
e Id I
AWS Lambda Amazon
Aurora
Amazon
RDS
VPC
✕
Any Subnet
Elastic network interface
11
Private subnet
.1 0. aBb
RN LI L B L P
L PV 2 B C
.1 0. D d
E
AWS Lambda Amazon
Aurora
Amazon
RDS
VPC
Any Subnet
Elastic network interface
12
DuoB
• n D V S m pt uy
• D ACPS
m g m Oz B D
• elc am -
e U id
Amazon
DynamoDBAWS Lambda
…
!
14
B u eK 1 t m a
• r P
• r
a a B K
S D
• o m
• r A Q P
• 1 P ) (
) 1 ( )( IP
)( + ( +( :
K D a
• + 1 IP )
• i a P
r c
r
• r a
I D
https://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/best-practices.html
ao aP
n y m B
16
B o R O
Q • S M O B
tf R Q R
• l e
• tfR Q R B i
n a
• pf o R Q a
L
• L D c
O
E
• R 17
B c
IET • B Ic
• o E t
B t
R
• Re
I t
• m I
• I ED
B aI
• B I
• y
I
• n I
• B
18
D B
19
B c
IET • B Ic
• o E t
B t
R
• Re
I t
• m I
• I ED
B aI
• B I
• y
I
• n I
• B
20
k E
(from re:Invent 2018 session)
•
c
• . 1
i E
• B e d
b R A a
• b d
21
B c
IET • B Ic
• o E t
B t
R
• Re
I t
• m I
• I ED
B aI
• B I
• y
I
• n I
• B
22
F IMKDP R E DI DI I
Use Case
C
C 2 A2 2
#
B
C
A2 2A A2 2A
A2 2A A2 2A
A2 2A 2 A2 2A A.
A2 2A 2 A2 2A
# 2A 2A C
2A 2 C
A2 A2
23
B c
IET • B Ic
• o E t
B t
R
• Re
I t
• m I
• I ED
B aI
• B I
• y
I
• n I
• B
24
.TABLE
Primary Key Attributes
PK SK, GSI-3-PK GSI-1-PK GSI-2-PK
Acr TargetACR AcrInfo1 AcrInfo2 EbookAsin
ABOOKACR1
ABOOKACR1-v0 ABOOK-ASIN1 ABOOK-SKU1
MAP-EBOOKACR1 SyncFileAcr ABOOK-ASIN1
ABOOKACR1#TRACK#1 ABOOK-ASIN1 ABOOK-SKU1
ABOOKACR1#TRACK#2 ABOOK-ASIN1 ABOOK-SKU1
EBOOKACR1 EBOOKACR1 EBOOK-SKU1 ASIN
25
.GSI1
GSI Partition Key Projected Attributes
GSI-1-PK Acr (Primary Table PK) TargetACR (Primary Table SK)
ABOOK-ASIN1 ABOOKACR1
ABOOKACR1-v1
ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2
SyncFileAcr ABOOKACR1 MAP-EBOOKACR1
EBOOK-SKU1 ABOOKACR1 EBOOKACR1
GSI2
GSI Partition Key Projected Attributes
GSI-2-PK Acr (Primary Table PK) TargetACR (Primary Table SK)
ABOOK-ASIN1 ABOOKACR1 MAP-EBOOKACR1
ABOOK-SKU1 ABOOKACR1
ABOOKACR1-v0
ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2
GSI3
GSI Partition Key Projected Attributes
TargetACR (Primary Table SK) Acr (Primary Table PK) TargetACR (Primary Table SK)
ABOOKACR1-v0 ABOOKACR1 ABOOKACR1-v0
MAP-EBOOKACR1 ABOOKACR1 MAP-EBOOKACR1
ABOOKACR1#TRACK#1 ABOOKACR1 ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2 ABOOKACR1 ABOOKACR1#TRACK#2
EBOOKACR1 EBOOKACR1 EBOOKACR1
26
B c
IET • B Ic
• o E t
B t
R
• Re
I t
• m I
• I ED
B aI
• B I
• y
I
• n I
• B
27
# Entity Use Case Lookup parameters Table / INDEX Key Conditions Filter Conditions
1 CompanionMapping getCompanionMappingsByAsin audiobookAsin/ebookSku GSI2 GSI-2=ABOOK-ASIN1 None
2 CompanionMapping
getCompanionMappingsByEbookAn
dAudiobookContentId
ebookAcr/sku,version,format or
audiobookAcr/asin,version,format
GSI-3 on TargetACR attribute OR
PrimaryKey on Table
GSI-3=MAP-EBOOKACR1 version=v and format=f
3 CompanionMapping getCompanionMappingsFromCache
ebookAcr/sku,version,format or
audiobookAcr/asin,version,format
GSI-3 on TargetACR attribute OR
PrimaryKey on Table
GSI-3=MAP-EBOOKACR1 version=v and format=f
4 CompanionMapping getCompanionMappings
syncfileAcr, ebookAcr?,
audiobookAcr?
GSI1 GSI-1=SyncFileAcr None
5 CompanionMapping getCompanionMappingsAvailable ebookAcr, audiobookAcr Primary Key on Table
Acr=ABOOKACR1 and
TargetACR beginswith "MAP-"
6 AcrInfo getACRInfo acr Primary Key on Table
Acr=ABOOKACR1 and
TargetACR beginswith
"ABOOKACR1-v"
7 AcrInfo getACRs acr / asin,version,format Primary Key on Table Acr=ABOOKACR1 version=v and format=f
8 AcrInfo getACRInfos acr Primary Key on table
Acr=ABOOKACR1 and
TargetACR beginswith "ABOOKACR1"
9 AcrInfo getACRInfosBySKU sku GSI2 GSI-2=ABOOK-SKU1
10 AudioProduct getAudioProductsForACRs acr Primary Key on table
Acr=ABOOKACR1 and TargetACR
beginswith "ABOOKACR1"
11 AudioProduct getAudioProducts sku, version, format GSI2 GSI-2=ABOOK-SKU1 version=v and format=f
12 AudioProduct
deleteAudioProductsMatchingSkuV
ersions
sku, version GSI2 GSI-2=ABOOK-SKU1 version=v
13 AudioProduct getChildAudioProductsForSKU sku GSI2 GSI-2=ABOOK-SKU1
14 Product getProductInfoByAsins asin GSI1 GSI-1=ABOOK-ASIN1
15 Product getParentChildDataByParentAsins asin GSI1 GSI-1=ABOOK-ASIN1
16 AudioFile getAudioFilesForACR acr Primary Key on table
Acr=ABOOKACR1 and
TargetACR beginswith
"ABOOKACR1#"
28
D e m a
IET • mD e m
• I
D E
R
• y a R m yB
m I
• ot I B
• R I
m D c I
• D I
• R I
m B n
• m I
• D I
29
B
D
30
B
B D
31
E
ID:
:
AWS Loft Tokyo:
:
:
ID
2 DynamoDB
AWS Loft
Tokyo
yy/3/4
#DynamoDB
#Serverless
14
AWS Loft
Tokyo
yy/5/9
#Serverless
#Lambda
#Design
33 API Night
AWS Loft
Tokyo
yy/6/23
#WebAPI #JWT
#APIGateway
#Auth #OAuth
#OIDC #Cognito
> >><< <
33
D e m a
IET • mD e m
• I
D E
R
• y a R m yB
m I
• ot I B
• R I
m D c I
• D I
• R I
m B n
• m I
• D I
34
id (PK)
name
venue_id (FK)
date
Events
id (PK)
name
Tags
event_id (PK, FK)
tag_id (PK, FK)
EventTags
id (PK)
name
address
Venues
-- SQL
-- :
SELECT e.id, v.name... FROM Events e
JOIN Venues v ON v.id = e.venue_id
JOIN EventTags et ON et.event_id = e.id
JOIN Tags t ON t.id = et.tag_id
WHERE v.name = :vname AND t.name = :tname
35
2 2 2
Use Case
. . . .
. . . .
. . .
. . . .
# . . .
. .
. .
36
i n t hc et Ql tTABLE
Partition Key Attributes
{EventID} {EventName} {VenueName} {TagName1, ...} {yyyy-mm-dd}
... ... ... ... ...
• . . . .3 GB I S
G D +- 3 . Q G
• +- 3 i n t hc m t
lma t Sr c
• QE +- 3 Q F D vQ D
u +- 3 QE . . . -/ . . S
D
BS y F
38
e b l cTABLE
Primary Key Attributes
Partition Key GSI-1-PK GSI-2-PK GSI-3-PK GSI-4-PK
{EventID} {EventName} {VenueName} {TagName1, ...} {yyyy-mm-dd}
... ... ... ... ...
• / + / . 0- 2 0-. 3.2
G
• S u b le b r a b b
• l o y x
b dn c Q I
39
-
GTABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK GSI-2-PK
ID DataType DataValue VenueName VenueAddress
{EventID} EventName {EventName}
{EventID} VenueID {VenueID}
{EventID} Date {yyyy-mm-dd}
{EventID} Tag_{TagName} Tag_{TagName}
{VenueID} VenueInfo {VenueName} {Address}
• S 3
• . I G
• 3 1
41
3 3GSI1
GSI Partition Key Projected Attributes
GSI-1-PK GSI-1-SK (Primary Table SK)
DataValue ID DataType VenueAddress
{EventName} {EventID} EventName
{VenueID} {EventID} Venue
{yyyy-mm-dd} {EventID} Date
Tag_{TagName} {EventID} Tag_{TagName}
GSI2
GSI Partition Key Projected Attributes
GSI-2-PK (Primary Table PK)
VenueName ID VenueAddress
{VenueName} {VenueID} {Address}
• . . 42
TABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK GSI-2-PK
ID DataType DataValue VenueName VenueAddress
E123 EventName DynamoDB
E123 VenueID V32
E123 Date yy/3/4
E123 Tag_#DynamoDB Tag_#DynamoDB
E123 Tag_#Serverless Tag_#Serverless
E145 EventName
E145 VenueID V32
E145 Date yy/5/9
E145 Tag_#Serverless Tag_#Serverless
E145 Tag_#Lambda Tag_#Lambda
E145 Tag_#Design Tag_#Design
V32 VenueInfo AWS Loft Tokyo
• . .4
• . 4 2 E
51 4 3
43
TABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK GSI-2-PK
ID DataType DataValue VenueName VenueAddress
E123 EventName DynamoDB
E123 VenueID V32
E123 Date yy/3/4
E123 Tag_#DynamoDB Tag_#DynamoDB
E123 Tag_#Serverless Tag_#Serverless
E145 EventName
E145 VenueID V32
E145 Date yy/5/9
E145 Tag_#Serverless Tag_#Serverless
E145 Tag_#Lambda Tag_#Lambda
E145 Tag_#Design Tag_#Design
V32 VenueInfo AWS Loft Tokyo
1 3
Query(ID = :eventId) . 3 : .
Table Query(ID = "E123") 44
TABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK GSI-2-PK
ID DataType DataValue VenueName VenueAddress
E123 EventName DynamoDB
E123 VenueID V32
E123 Date yy/3/4
E123 Tag_#DynamoDB Tag_#DynamoDB
E123 Tag_#Serverless Tag_#Serverless
E145 EventName
E145 VenueID V32
E145 Date yy/5/9
E145 Tag_#Serverless Tag_#Serverless
E145 Tag_#Lambda Tag_#Lambda
E145 Tag_#Design Tag_#Design
V32 VenueInfo AWS Loft Tokyo
1 3
Query(DataValue = :tagName) . : .
GSI1.Query(DataValue = "Tag_#Serverless") 45
dcj nlr
Use Case Parameters Table/Index API & Key Conditions
. DI I. DI . DI1- G C G B 4 G 1- ) ( DI1
. DI I. DI . DI2 C 1 4 G - I B ) ( DI2 C
. DI I. DI D 2 C
1
1
4 G D 2 C ) ( D 2 C
4 G - I B ) ( D 1
. DI I. DI - I 1 4 G - I B ) ( I
# . DI I. DI 1 4 G - I B ) (I 2 C
I . DI1- G C G B 4 G 1- ) ( DI1
D I D . DI1-
G C G B
G C G B
I1I C 1- ) ( DI1 D - I F ) D 1-
I1I C 1- ) ( D 1 D - I F ) D 1D=E
• i fe f B 1D bp N Sh gb
m aV TP I1I C I I:?1I C 4 G : D Qbus
• / BI G ,ED I ED GE :I ED . FG ED bot
46
A
• . . . a
. 1 B4
• y 2 D
•
n 3 .
. .
. o
o
• m z
o 3 48
s ztL P
• 9 B A 9 rpo [d
• A 9 h cg ]a
• 9 B A 9 h cg ]a
n 9 B 0 1 l
• - 1 9 .
9 B A 9 2 1 2 s
• A 9 bD ibkm 9 1 1
• A 1 y S OW A 9 v e Dm 49
D GI1 E A S D GI
TABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK
ID DataType DataValue1 DataValue2
{EventID} EventName {EventName}
{EventID} VenueInfo {VenueName} {Address}
{EventID} Date {yyyy-mm-dd}
{EventID} Tag_{TagName} Tag_{TagName}
•
. - D
52
-1 .TABLE
Primary Key Attributes
PK, GSI-1-SK SK GSI-1-PK
ID DataType DataValue1 DataValue2
E123 EventName DynamoDB
E123 VenueInfo AWS Loft Tokyo
E123 Date yy/3/4
E123 Tag_#DynamoDB Tag_#DynamoDB
E123 Tag_#Serverless Tag_#Serverless
E145 EventName
E145 VenueID AWS Loft Tokyo
E145 Date yy/5/9
E145 Tag_#Serverless Tag_#Serverless
E145 Tag_#Lambda Tag_#Lambda
E145 Tag_#Design Tag_#Design
53
1 -. 1 -.GSI1
GSI Partition Key Projected Attributes
GSI-1-PK GSI-1-SK (Primary Table SK)
DataValue ID DataValue1 DataValue2
{EventName} {EventID} EventName
{VenueID} {EventID} Venue
{yyyy-mm-dd} {EventID} Date
Tag_{TagName} {EventID} Tag_{TagName}
{VenueName} {EventID} {VenueName} {Address}
54
(BB =I _iurmv
Use Case Parameters Table/Index API & Key Conditions
G ED E G E) G E. C= C 1 C . G E.
G ED E G ED) G E/ - . 1 C E G E/
G ED E G ED) / - . 1 C E G /
G ED E G ED) E - . 1 C E E
# G ED E G ED) - . 1 C E E /
D E D) G E. C= C
1 C
. G E. E B = D =E
E ) G E. C= C
- E.E
. G E E B . :A
• T o w h a i e nr V
• tl fd y xP CAD A D y Q NpS sg b 55
2 U m E SVg I d
1 -
1 - .
d nm
A- . B
d , .
e
x um
• V I E EU G E U
• G 2 d I
a S a m d
• i s
• A my t e VB
• ir v p NS S G E
56
- 2.
TABLE
Primary Key Attributes
PK SK, GSI-1-PK GSI-1-SK
EventID DataType DataValue
{EventID} EventName {EventName}
{EventID} VenueName {VenueName}
{EventID} VenueAddress {VenueAddress}
{EventID} Date {yyyy-mm-dd}
{EventID} Tag_{n} {TagName}
58
2 - .
TABLE
Primary Key Attributes
PK SK, GSI-1-PK GSI-1-SK
EventID DataType DataValue
E123 EventName DynamoDB
E123 VenueName AWS Loft Tokyo
E123 VenueAddress
E123 Date yy/3/4
E123 Tag_1 #DynamoDB
E123 Tag_2 #Serverless
E145 EventName
E145 VenueName AWS Loft Tokyo
E145 VenueAddress
E145 Date yy/5/9
E145 Tag_1 #Serverless
E145 Tag_2 #Lambda
E145 Tag_3 #Design
59
2 . -GSI1
GSI Partition Key Projected Attributes
GSI-1-PK GSI-1-SK (Primary Table SK)
DataType DataValue EventID
EventName {EventName} {EventID}
VenueName {VenueName} {EventID}
VenueAddress {VenueAddress} {EventID}
Date {yyyy-mm-dd} {EventID}
Tag_{n} {TagName} {EventID}
60
:: TS
Use Case Parameters Table/Index Key Conditions
= = = A = - 1 A 12 = =
= = = A = 1 .
1=1 A: = 1
= 1 = 1
= = = A 1 .
1=1 A: 1
1 1
# = = = A 1= .
1=1 A: 1=
1= 1=
= = = A 1
4825
6
57 3 1
1 = 1 A 1 1
1 = 1 A =
= A =
• P = = A 1 I N P BDaG V E
61
. - N . . N PB
GSI1
GSI Partition Key Projected Attributes
GSI-1-PK GSI-1-SK (Primary Table SK)
DataType DataValue EventID
EventName {EventName} {EventID}
VenueName {VenueName} {EventID}
VenueAddress {VenueAddress} {EventID}
Date {yyyy-mm-dd} {EventID}
Tag_{n} {TagName} {EventID}
• 2. BS . b KT
Query(DataType = begins_with("Tag_") and DataValue = :tagName)
. _ . B AN
• Query(DataType = Tag_{n} and DataValue = :tagName)
dBS Pe TE
. a N
62

More Related Content

More from Amazon Web Services Japan

202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用Amazon Web Services Japan
 
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdfAmazon Web Services Japan
 
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介Amazon Web Services Japan
 
Amazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon Web Services Japan
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことAmazon Web Services Japan
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチAmazon Web Services Japan
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介Amazon Web Services Japan
 
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer ProfilesAmazon Web Services Japan
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Web Services Japan
 
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨Amazon Web Services Japan
 
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介Amazon Web Services Japan
 
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介Amazon Web Services Japan
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...Amazon Web Services Japan
 
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピAmazon Web Services Japan
 
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operations20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operationsAmazon Web Services Japan
 
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報Amazon Web Services Japan
 
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをなAmazon Web Services Japan
 
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPNAmazon Web Services Japan
 

More from Amazon Web Services Japan (20)

202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
 
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
 
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
 
Amazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDD
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのこと
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
 
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
 
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
 
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
 
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
 
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
 
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operations20211209 Ops-JAWS Re invent2021re-cap-cloud operations
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
 
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
20211203 AWS Black Belt Online Seminar AWS re:Invent 2021アップデート速報
 
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
[AWS EXpert Online for JAWS-UG 18] 見せてやるよ、Step Functions の本気ってやつをな
 
20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes
 
20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)
 
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

【旧版・説明欄参照ください】 サーバーレスアプリケーション向きの DB 設計ベストプラクティス

  • 1. B 2019.05.09 Amazon Web Services Japan K.K. Akihiro Tsukada, Startup Solutions Architect, Manager
  • 2. • # # # • # • # # # 2
  • 3. • D A R • A D • B 3
  • 4. 9 B A 9 t D S p z O • 9 B A 9 oml a • • 9 B A 9 e dg W O k s n 9 B 0 1 ci[ • - 1 9 . 9 B A 9 2 1 2 p y • A 9 ] h [| 9 1 1 • A 1 v PL A 9 rsb] 4
  • 5. S LP D A B [ OL W ] 5
  • 6.
  • 8. AWS Lambda Amazon RDSAmazon Aurora Amazon DynamoDB Amazon ElastiCache Amazon Neptune ...etc 8
  • 9. ., 9 b AWS Lambda ., @ a D B R L ., 5 01 2 Amazon RDS Amazon Aurora 9
  • 10. a S AWS Lambda Amazon RDS Amazon Aurora D L b L M 1 1 B 1 d B R B . . … ! 10
  • 11. Private subnet . B a IbD i L P DN V R S E D 2 C I . L P ICE . C e Id I AWS Lambda Amazon Aurora Amazon RDS VPC ✕ Any Subnet Elastic network interface 11
  • 12. Private subnet .1 0. aBb RN LI L B L P L PV 2 B C .1 0. D d E AWS Lambda Amazon Aurora Amazon RDS VPC Any Subnet Elastic network interface 12
  • 13.
  • 14. DuoB • n D V S m pt uy • D ACPS m g m Oz B D • elc am - e U id Amazon DynamoDBAWS Lambda … ! 14
  • 15.
  • 16. B u eK 1 t m a • r P • r a a B K S D • o m • r A Q P • 1 P ) ( ) 1 ( )( IP )( + ( +( : K D a • + 1 IP ) • i a P r c r • r a I D https://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/best-practices.html ao aP n y m B 16
  • 17. B o R O Q • S M O B tf R Q R • l e • tfR Q R B i n a • pf o R Q a L • L D c O E • R 17
  • 18. B c IET • B Ic • o E t B t R • Re I t • m I • I ED B aI • B I • y I • n I • B 18
  • 20. B c IET • B Ic • o E t B t R • Re I t • m I • I ED B aI • B I • y I • n I • B 20
  • 21. k E (from re:Invent 2018 session) • c • . 1 i E • B e d b R A a • b d 21
  • 22. B c IET • B Ic • o E t B t R • Re I t • m I • I ED B aI • B I • y I • n I • B 22
  • 23. F IMKDP R E DI DI I Use Case C C 2 A2 2 # B C A2 2A A2 2A A2 2A A2 2A A2 2A 2 A2 2A A. A2 2A 2 A2 2A # 2A 2A C 2A 2 C A2 A2 23
  • 24. B c IET • B Ic • o E t B t R • Re I t • m I • I ED B aI • B I • y I • n I • B 24
  • 25. .TABLE Primary Key Attributes PK SK, GSI-3-PK GSI-1-PK GSI-2-PK Acr TargetACR AcrInfo1 AcrInfo2 EbookAsin ABOOKACR1 ABOOKACR1-v0 ABOOK-ASIN1 ABOOK-SKU1 MAP-EBOOKACR1 SyncFileAcr ABOOK-ASIN1 ABOOKACR1#TRACK#1 ABOOK-ASIN1 ABOOK-SKU1 ABOOKACR1#TRACK#2 ABOOK-ASIN1 ABOOK-SKU1 EBOOKACR1 EBOOKACR1 EBOOK-SKU1 ASIN 25
  • 26. .GSI1 GSI Partition Key Projected Attributes GSI-1-PK Acr (Primary Table PK) TargetACR (Primary Table SK) ABOOK-ASIN1 ABOOKACR1 ABOOKACR1-v1 ABOOKACR1#TRACK#1 ABOOKACR1#TRACK#2 SyncFileAcr ABOOKACR1 MAP-EBOOKACR1 EBOOK-SKU1 ABOOKACR1 EBOOKACR1 GSI2 GSI Partition Key Projected Attributes GSI-2-PK Acr (Primary Table PK) TargetACR (Primary Table SK) ABOOK-ASIN1 ABOOKACR1 MAP-EBOOKACR1 ABOOK-SKU1 ABOOKACR1 ABOOKACR1-v0 ABOOKACR1#TRACK#1 ABOOKACR1#TRACK#2 GSI3 GSI Partition Key Projected Attributes TargetACR (Primary Table SK) Acr (Primary Table PK) TargetACR (Primary Table SK) ABOOKACR1-v0 ABOOKACR1 ABOOKACR1-v0 MAP-EBOOKACR1 ABOOKACR1 MAP-EBOOKACR1 ABOOKACR1#TRACK#1 ABOOKACR1 ABOOKACR1#TRACK#1 ABOOKACR1#TRACK#2 ABOOKACR1 ABOOKACR1#TRACK#2 EBOOKACR1 EBOOKACR1 EBOOKACR1 26
  • 27. B c IET • B Ic • o E t B t R • Re I t • m I • I ED B aI • B I • y I • n I • B 27
  • 28. # Entity Use Case Lookup parameters Table / INDEX Key Conditions Filter Conditions 1 CompanionMapping getCompanionMappingsByAsin audiobookAsin/ebookSku GSI2 GSI-2=ABOOK-ASIN1 None 2 CompanionMapping getCompanionMappingsByEbookAn dAudiobookContentId ebookAcr/sku,version,format or audiobookAcr/asin,version,format GSI-3 on TargetACR attribute OR PrimaryKey on Table GSI-3=MAP-EBOOKACR1 version=v and format=f 3 CompanionMapping getCompanionMappingsFromCache ebookAcr/sku,version,format or audiobookAcr/asin,version,format GSI-3 on TargetACR attribute OR PrimaryKey on Table GSI-3=MAP-EBOOKACR1 version=v and format=f 4 CompanionMapping getCompanionMappings syncfileAcr, ebookAcr?, audiobookAcr? GSI1 GSI-1=SyncFileAcr None 5 CompanionMapping getCompanionMappingsAvailable ebookAcr, audiobookAcr Primary Key on Table Acr=ABOOKACR1 and TargetACR beginswith "MAP-" 6 AcrInfo getACRInfo acr Primary Key on Table Acr=ABOOKACR1 and TargetACR beginswith "ABOOKACR1-v" 7 AcrInfo getACRs acr / asin,version,format Primary Key on Table Acr=ABOOKACR1 version=v and format=f 8 AcrInfo getACRInfos acr Primary Key on table Acr=ABOOKACR1 and TargetACR beginswith "ABOOKACR1" 9 AcrInfo getACRInfosBySKU sku GSI2 GSI-2=ABOOK-SKU1 10 AudioProduct getAudioProductsForACRs acr Primary Key on table Acr=ABOOKACR1 and TargetACR beginswith "ABOOKACR1" 11 AudioProduct getAudioProducts sku, version, format GSI2 GSI-2=ABOOK-SKU1 version=v and format=f 12 AudioProduct deleteAudioProductsMatchingSkuV ersions sku, version GSI2 GSI-2=ABOOK-SKU1 version=v 13 AudioProduct getChildAudioProductsForSKU sku GSI2 GSI-2=ABOOK-SKU1 14 Product getProductInfoByAsins asin GSI1 GSI-1=ABOOK-ASIN1 15 Product getParentChildDataByParentAsins asin GSI1 GSI-1=ABOOK-ASIN1 16 AudioFile getAudioFilesForACR acr Primary Key on table Acr=ABOOKACR1 and TargetACR beginswith "ABOOKACR1#" 28
  • 29. D e m a IET • mD e m • I D E R • y a R m yB m I • ot I B • R I m D c I • D I • R I m B n • m I • D I 29
  • 32.
  • 33. E ID: : AWS Loft Tokyo: : : ID 2 DynamoDB AWS Loft Tokyo yy/3/4 #DynamoDB #Serverless 14 AWS Loft Tokyo yy/5/9 #Serverless #Lambda #Design 33 API Night AWS Loft Tokyo yy/6/23 #WebAPI #JWT #APIGateway #Auth #OAuth #OIDC #Cognito > >><< < 33
  • 34. D e m a IET • mD e m • I D E R • y a R m yB m I • ot I B • R I m D c I • D I • R I m B n • m I • D I 34
  • 35. id (PK) name venue_id (FK) date Events id (PK) name Tags event_id (PK, FK) tag_id (PK, FK) EventTags id (PK) name address Venues -- SQL -- : SELECT e.id, v.name... FROM Events e JOIN Venues v ON v.id = e.venue_id JOIN EventTags et ON et.event_id = e.id JOIN Tags t ON t.id = et.tag_id WHERE v.name = :vname AND t.name = :tname 35
  • 36. 2 2 2 Use Case . . . . . . . . . . . . . . . # . . . . . . . 36
  • 37.
  • 38. i n t hc et Ql tTABLE Partition Key Attributes {EventID} {EventName} {VenueName} {TagName1, ...} {yyyy-mm-dd} ... ... ... ... ... • . . . .3 GB I S G D +- 3 . Q G • +- 3 i n t hc m t lma t Sr c • QE +- 3 Q F D vQ D u +- 3 QE . . . -/ . . S D BS y F 38
  • 39. e b l cTABLE Primary Key Attributes Partition Key GSI-1-PK GSI-2-PK GSI-3-PK GSI-4-PK {EventID} {EventName} {VenueName} {TagName1, ...} {yyyy-mm-dd} ... ... ... ... ... • / + / . 0- 2 0-. 3.2 G • S u b le b r a b b • l o y x b dn c Q I 39
  • 40. -
  • 41. GTABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK GSI-2-PK ID DataType DataValue VenueName VenueAddress {EventID} EventName {EventName} {EventID} VenueID {VenueID} {EventID} Date {yyyy-mm-dd} {EventID} Tag_{TagName} Tag_{TagName} {VenueID} VenueInfo {VenueName} {Address} • S 3 • . I G • 3 1 41
  • 42. 3 3GSI1 GSI Partition Key Projected Attributes GSI-1-PK GSI-1-SK (Primary Table SK) DataValue ID DataType VenueAddress {EventName} {EventID} EventName {VenueID} {EventID} Venue {yyyy-mm-dd} {EventID} Date Tag_{TagName} {EventID} Tag_{TagName} GSI2 GSI Partition Key Projected Attributes GSI-2-PK (Primary Table PK) VenueName ID VenueAddress {VenueName} {VenueID} {Address} • . . 42
  • 43. TABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK GSI-2-PK ID DataType DataValue VenueName VenueAddress E123 EventName DynamoDB E123 VenueID V32 E123 Date yy/3/4 E123 Tag_#DynamoDB Tag_#DynamoDB E123 Tag_#Serverless Tag_#Serverless E145 EventName E145 VenueID V32 E145 Date yy/5/9 E145 Tag_#Serverless Tag_#Serverless E145 Tag_#Lambda Tag_#Lambda E145 Tag_#Design Tag_#Design V32 VenueInfo AWS Loft Tokyo • . .4 • . 4 2 E 51 4 3 43
  • 44. TABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK GSI-2-PK ID DataType DataValue VenueName VenueAddress E123 EventName DynamoDB E123 VenueID V32 E123 Date yy/3/4 E123 Tag_#DynamoDB Tag_#DynamoDB E123 Tag_#Serverless Tag_#Serverless E145 EventName E145 VenueID V32 E145 Date yy/5/9 E145 Tag_#Serverless Tag_#Serverless E145 Tag_#Lambda Tag_#Lambda E145 Tag_#Design Tag_#Design V32 VenueInfo AWS Loft Tokyo 1 3 Query(ID = :eventId) . 3 : . Table Query(ID = "E123") 44
  • 45. TABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK GSI-2-PK ID DataType DataValue VenueName VenueAddress E123 EventName DynamoDB E123 VenueID V32 E123 Date yy/3/4 E123 Tag_#DynamoDB Tag_#DynamoDB E123 Tag_#Serverless Tag_#Serverless E145 EventName E145 VenueID V32 E145 Date yy/5/9 E145 Tag_#Serverless Tag_#Serverless E145 Tag_#Lambda Tag_#Lambda E145 Tag_#Design Tag_#Design V32 VenueInfo AWS Loft Tokyo 1 3 Query(DataValue = :tagName) . : . GSI1.Query(DataValue = "Tag_#Serverless") 45
  • 46. dcj nlr Use Case Parameters Table/Index API & Key Conditions . DI I. DI . DI1- G C G B 4 G 1- ) ( DI1 . DI I. DI . DI2 C 1 4 G - I B ) ( DI2 C . DI I. DI D 2 C 1 1 4 G D 2 C ) ( D 2 C 4 G - I B ) ( D 1 . DI I. DI - I 1 4 G - I B ) ( I # . DI I. DI 1 4 G - I B ) (I 2 C I . DI1- G C G B 4 G 1- ) ( DI1 D I D . DI1- G C G B G C G B I1I C 1- ) ( DI1 D - I F ) D 1- I1I C 1- ) ( D 1 D - I F ) D 1D=E • i fe f B 1D bp N Sh gb m aV TP I1I C I I:?1I C 4 G : D Qbus • / BI G ,ED I ED GE :I ED . FG ED bot 46
  • 47.
  • 48. A • . . . a . 1 B4 • y 2 D • n 3 . . . . o o • m z o 3 48
  • 49. s ztL P • 9 B A 9 rpo [d • A 9 h cg ]a • 9 B A 9 h cg ]a n 9 B 0 1 l • - 1 9 . 9 B A 9 2 1 2 s • A 9 bD ibkm 9 1 1 • A 1 y S OW A 9 v e Dm 49
  • 50.
  • 51.
  • 52. D GI1 E A S D GI TABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK ID DataType DataValue1 DataValue2 {EventID} EventName {EventName} {EventID} VenueInfo {VenueName} {Address} {EventID} Date {yyyy-mm-dd} {EventID} Tag_{TagName} Tag_{TagName} • . - D 52
  • 53. -1 .TABLE Primary Key Attributes PK, GSI-1-SK SK GSI-1-PK ID DataType DataValue1 DataValue2 E123 EventName DynamoDB E123 VenueInfo AWS Loft Tokyo E123 Date yy/3/4 E123 Tag_#DynamoDB Tag_#DynamoDB E123 Tag_#Serverless Tag_#Serverless E145 EventName E145 VenueID AWS Loft Tokyo E145 Date yy/5/9 E145 Tag_#Serverless Tag_#Serverless E145 Tag_#Lambda Tag_#Lambda E145 Tag_#Design Tag_#Design 53
  • 54. 1 -. 1 -.GSI1 GSI Partition Key Projected Attributes GSI-1-PK GSI-1-SK (Primary Table SK) DataValue ID DataValue1 DataValue2 {EventName} {EventID} EventName {VenueID} {EventID} Venue {yyyy-mm-dd} {EventID} Date Tag_{TagName} {EventID} Tag_{TagName} {VenueName} {EventID} {VenueName} {Address} 54
  • 55. (BB =I _iurmv Use Case Parameters Table/Index API & Key Conditions G ED E G E) G E. C= C 1 C . G E. G ED E G ED) G E/ - . 1 C E G E/ G ED E G ED) / - . 1 C E G / G ED E G ED) E - . 1 C E E # G ED E G ED) - . 1 C E E / D E D) G E. C= C 1 C . G E. E B = D =E E ) G E. C= C - E.E . G E E B . :A • T o w h a i e nr V • tl fd y xP CAD A D y Q NpS sg b 55
  • 56. 2 U m E SVg I d 1 - 1 - . d nm A- . B d , . e x um • V I E EU G E U • G 2 d I a S a m d • i s • A my t e VB • ir v p NS S G E 56
  • 57.
  • 58. - 2. TABLE Primary Key Attributes PK SK, GSI-1-PK GSI-1-SK EventID DataType DataValue {EventID} EventName {EventName} {EventID} VenueName {VenueName} {EventID} VenueAddress {VenueAddress} {EventID} Date {yyyy-mm-dd} {EventID} Tag_{n} {TagName} 58
  • 59. 2 - . TABLE Primary Key Attributes PK SK, GSI-1-PK GSI-1-SK EventID DataType DataValue E123 EventName DynamoDB E123 VenueName AWS Loft Tokyo E123 VenueAddress E123 Date yy/3/4 E123 Tag_1 #DynamoDB E123 Tag_2 #Serverless E145 EventName E145 VenueName AWS Loft Tokyo E145 VenueAddress E145 Date yy/5/9 E145 Tag_1 #Serverless E145 Tag_2 #Lambda E145 Tag_3 #Design 59
  • 60. 2 . -GSI1 GSI Partition Key Projected Attributes GSI-1-PK GSI-1-SK (Primary Table SK) DataType DataValue EventID EventName {EventName} {EventID} VenueName {VenueName} {EventID} VenueAddress {VenueAddress} {EventID} Date {yyyy-mm-dd} {EventID} Tag_{n} {TagName} {EventID} 60
  • 61. :: TS Use Case Parameters Table/Index Key Conditions = = = A = - 1 A 12 = = = = = A = 1 . 1=1 A: = 1 = 1 = 1 = = = A 1 . 1=1 A: 1 1 1 # = = = A 1= . 1=1 A: 1= 1= 1= = = = A 1 4825 6 57 3 1 1 = 1 A 1 1 1 = 1 A = = A = • P = = A 1 I N P BDaG V E 61
  • 62. . - N . . N PB GSI1 GSI Partition Key Projected Attributes GSI-1-PK GSI-1-SK (Primary Table SK) DataType DataValue EventID EventName {EventName} {EventID} VenueName {VenueName} {EventID} VenueAddress {VenueAddress} {EventID} Date {yyyy-mm-dd} {EventID} Tag_{n} {TagName} {EventID} • 2. BS . b KT Query(DataType = begins_with("Tag_") and DataValue = :tagName) . _ . B AN • Query(DataType = Tag_{n} and DataValue = :tagName) dBS Pe TE . a N 62