More Related Content
Similar to Devsumi2019 dynamodb (20)
More from oranie Narut (11)
Devsumi2019 dynamodb
- 1. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon DynamoDB
2019/02/14
- 2. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• ( ) id:oranie
•
–Web IP
– Web MySQL
Cassandra
–Cassandra summit JPN 2014, 2017
•
–NoSQL DynamoDB
- 3. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users 1 million+
Data volume TB, PB, EB
Locality Global
Performance Milliseconds, microseconds
Request rate Millions
Access Mobile, IoT, devices
Scale Up and down
Economics Pay as you go
Developer access Instant API access
- 4. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• D
• B
• DB
1
B
• BD B
- 5. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
1 L
•
r i H r
• e M Q
• S W Q
• H 1 L y t
- 6. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
RDS for MySQL
B
a D
I A
I A
e a D
I AM
D
Amazon RDS Amazon RDS
AWS Cloud
VPC
Amazon EC2 Amazon EC2
Auto Scaling group
- 7. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Users 1 million+
Data volume TB, PB, EB
Locality Global
Performance Milliseconds, microseconds
Request rate Millions
Access Mobile, IoT, devices
Scale Up and down
Economics Pay as you go
Developer access Instant API access
- 8. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
EC
Amazon.com
— Werner Vogels
CTO, Amazon
- 9. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon DynamoDB
Fully managed nonrelational database for any scale
Fast, consistent performance
Virtually unlimited throughput
Virtually unlimited storage
Encryption at rest and transit
Fine-grained access control
PCI, HIPAA, FIPS140-2 eligible
Service-level agreement
Maintenance free
Serverless
Auto scaling
Backup and restore
Global tables
- 10. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DynamoDB
Advancements over the last 21 months
VPC
endpoints
April 2017
Auto
scaling
June 2017
DynamoDB
Accelerator (DAX)
April 2017
Time To
Live (TTL)
February 2017
Global tables
On-demand
backup
Encryption at rest
November 2017 November 2017 November 2017
Point-in-time
recovery
March 2018
SLA
June 2018
99.999% SLA
August 2018
Adaptive
capacity ACID
November 2018
Transactions
November 2018
On-demand
- 11. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Fully managed
Maintenance free
Security
Operating system patching
Database patching
Access control
Audit
Encryption
Compliance
Durability
Sustain server, rack, and datacenter outages
Re-replicate data quickly upon hardware failure
Manage backup and restore
Availability
High availability configuration
Monitoring
Cross-region replication
Performance
Performance tuning
Indexing
In-memory caching
Scalability
Capacity planning
Host provisioning
Host repair and retirement
- 12. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 13. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
You build it, you run it.
- 14. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 15. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
table
items
attributes
Partation
Key
Sort Key
1:N
Query
==, <, >, >=, <=
“begins with”
“between”
sorted results
counts
/ N
name/value JSON
- 16. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
00 55 A954 FFAA00 FF
Partition Keys
Id = 1
Name = Jim
Hash (1) = 7B
Id = 2
Name = Andy
Dept = Eng
Hash (2) = 48
Id = 3
Name = Kim
Dept = Ops
Hash (3) = CD
Key Space
- 17. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Partition 3
Partition:Sort Key
: Item
(∞)
§
00:0 FF:∞
Hash (2) = 48
Customer# = 2
Order# = 10
Item = Pen
Customer# = 2
Order# = 11
Item = Shoes
Customer# = 1
Order# = 10
Item = Toy
Customer# = 1
Order# = 11
Item = Boots
Hash (1) = 7B
Customer# = 3
Order# = 10
Item = Book
Customer# = 3
Order# = 11
Item = Paper
Hash (3) = CD
55 A9:∞54:∞ AAPartition 1 Partition 2
- 18. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Partitions are three-way replicated
Id = 2
Name = Andy
Dept = Engg
Id = 3
Name = Kim
Dept = Ops
Id = 1
Name = Jim
Id = 2
Name = Andy
Dept = Engg
Id = 3
Name = Kim
Dept = Ops
Id = 1
Name = Jim
Id = 2
Name = Andy
Dept = Engg
Id = 3
Name = Kim
Dept = Ops
Id = 1
Name = Jim
Replica 1
Replica 2
Replica 3
- 19. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
A,D B,E C,F
Parition1 Partition2 ParitionN
Partation Key
1
RCU 3000 or WCU 1000
: x
x/N x/N x/N
- 20. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Adaptive Throughput
- 21. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Adaptive Throughput Kicks In
Helped more than 2,800 Amazon tables and indexes on
Prime Day!
- 22. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Local Secondary Index (LSI)
• 0 a G 0G
• 0 1
• B e SP G1b
A1
(PK)
A3
(Sort)
A2
(table key)
A1
(PK)
A2
(Sort)
A3 A4 A5
LSIs A1
(PK)
A4
(Sort)
A2
(table key)
A3
(projected)
Table
KEYS_ONLY
INCLUDE A3
A1
(PK)
A5
(Sort)
A2
(table key)
A3
(projected)
A4
(projected) ALL
- 23. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
LSI
LSI
Query
()
- 24. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Global Secondary Index (GSI)
Partition Key
Partition Key
A1
(PK)
A2 A3 A4 A5
GSIs A5
(PK)
A4
(Sort)
A1
(table key)
A3
(projected)
Table
INCLUDE A3
A4
(PK)
A5
(Sort)
A1
(table key)
A2
(projected)
A3
(projected) ALL
A2
(PK)
A1
(table key)
KEYS_ONLY
- 25. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
GSI
GSI
GSI
)
(
K IK
K GK
F
(
IK K
GK K
F
(
K IK
K GK
- 26. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
GSI
Table
Primary
table
Primary
table
Primary
table
Primary
table
Global
Secondary
Index
Client
1. Update request
2. Asynchronous
update (in progress)
2. Update response
GSI !
- 27. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 28. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
SQL vs. NoSQL design pattern
Product Database
ID
Type
Price
Description
Products
ID
Title
Category
Fiction
Producer
Director
…
Videos
ID
Artist
Title
Genre
…
Albums
ID
Author
Title
Fiction
Category
Date
…
Books
{
Product ID,
Type,
Price,
Description,
Author,
Title,
Fiction,
Category,
Date,
…
}
ID
AlbumID
Title
Duration
…
Tracks
ActorID
VideoID
ActorVideo
ID
Name
Age
Gender
Bio
…
Actors
{
Product ID,
Type,
Price,
Description,
Artist,
Title,
Genre,
Tracks: [ {
Title1,
Duration1
},{
Title2,
Duration2,
} ]
…
}
{
Product ID,
Type,
Price,
Description,
Title,
Category,
Fiction,
Producer,
Director,
Actors: [ {
ActorID,
Name,
Age,
Gender,
ShortBio
}, … ]
}
Normalization Aggregation
- 29. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
: 1 A
• 0 A @ D I PE J-1.
• - . 5:- . 0.
• 2B A. , = SG U
1 -
2B A. @ , = @ = 5@ @
2B A. A , = A D :@@ 5@ @
1 -
, = @ = 5@ 2B A. @ @
, = A D :@@ 5@ 2B A. A @
- 30. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 1
• 3 D 1 D Pa I 1,
• 0 D ,Pa KQS
• c U bN P HKG
3 - D 1 D A
2A , 3= , 3= :15
15 3
2A , 3= , 3= , :15
15 3
2A , 3= , 3= :15
15 3
- 31. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
:
• , 3 , 1 1 2 2
G
• : =
• I P SG I PA SGQ I
P = U
- -
, ,
, ,
, ,
- -
, ,
, ,
, ,
- 32. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 33. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
https://www.qwiklabs.com
- 34. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Targeting queries
Query filters, composite keys, and sparse indexes
- 35. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Secondary index
Opponent Date GameId Status Host
Alice 2014-10-02 d9bl3 DONE David
Carol 2014-10-08 o2pnb IN_PROGRESS Bob
Bob 2014-09-30 72f49 PENDING Alice
Bob 2014-10-03 b932s PENDING Carol
Bob 2014-10-03 ef9ca IN_PROGRESS David
BobPartition key Sort key
- 36. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Secondary Index
Approach 1: Query filter(Filter )
Bob
Opponent Date GameId Status Host
Alice 2014-10-
02
d9bl3 DONE Davi
d
Carol 2014-10-
08
o2pnb IN_PROGRESS Bob
Bob 2014-09-
30
72f49 PENDING Alice
Bob 2014-10-
03
b932s PENDING Carol
Bob 2014-10-
03
ef9ca IN_PROGRESS Davi
d
SELECT * FROM Game
WHERE Opponent='Bob'
ORDER BY Date DESC
FILTER ON Status='PENDING'
(filtered out)
- 37. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
( ) 2
StatusDate
DONE_2014-10-02
IN_PROGRESS_2014-10-08
IN_PROGRESS_2014-10-03
PENDING_2014-09-30
PENDING_2014-10-03
Status
DONE
IN_PROGRESS
IN_PROGRESS
PENDING
PENDING
Date
2014-10-
02
2014-10-
08
2014-10-
03
2014-10-
03
2014-09-
30
+ =
- 38. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Secondary Index
( ) 2
Opponent StatusDate GameId Host
Alice DONE_2014-10-02 d9bl3 David
Carol IN_PROGRESS_2014-10-08 o2pnb Bob
Bob IN_PROGRESS_2014-10-03 ef9ca David
Bob PENDING_2014-09-30 72f49 Alice
Bob PENDING_2014-10-03 b932s Carol
Partition key Sort key
- 39. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Opponent StatusDate GameId Host
Alice DONE_2014-10-02 d9bl3 David
Carol IN_PROGRESS_2014-10-08 o2pnb Bob
Bob IN_PROGRESS_2014-10-03 ef9ca David
Bob PENDING_2014-09-30 72f49 Alice
Bob PENDING_2014-10-03 b932s Carol
Secondary index
( ) 2
Bob
SELECT * FROM Game
WHERE Opponent='Bob'
AND StatusDate BEGINS_WITH 'PENDING'
- 40. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Sparse indexes
Id
(Partition)
User Game Score Date Award
1 Bob G1 1300 2012-12-23
2 Bob G1 1450 2012-12-23
3 Jay G1 1600 2012-12-24
4 Mary G1 2000 2012-10-24 Champ
5 Ryan G2 123 2012-03-10
6 Jones G2 345 2012-03-20
-
Award
(Partition)
Id User Score
Champ 4 Mary 2000
Scan sparse GSIs
,
- 41. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• ) ( ( ) ( (
A A S K C
• ( ) ( ( A
S
Status + Date
- 42. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
- 43. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
4/ 25 3 2 /1 4/
• ( G b O S B ID
• 2 O S D G 0 2 D a
• G (D G D D e c ) 1
• ) 1 0 Gd 0 2G d
n : D EO : V
n L o S
IN i ( G NR687 ) n /
A A
- 44. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
B
IC
13
A
K M
D
S
PR
2 1
1
2 1
1
2 1
1
2 3
- 45. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
G
C
1
1 1
A
1
E
ID
- 46. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
) L
E
1( (
PC
D
GO
I
N A
K
E
PC
N A
K
Partition Key Sort Key
D
GSI
- 47. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
( ) (
• I D B
So
• I D
Ø D a M
n D G M m R
- 48. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
(
)
- 49. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
5 0 1 12C
Shoppers
70,000/sec
SELECT Id, Description, ...
FROM ProductCatalog
WHERE Id="POPULAR_PRODUCT"
- 50. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
https://aws.amazon.com/jp/blogs/database/how-to-use-the-new-amazon-dynamodb-key-diagnostics-library-to-
visualize-and-understand-your-applications-traffic-patterns/
How to use the new Amazon DynamoDB key diagnostics library to visualize and
understand your application’s traffic patterns
- 51. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DynamoDB
100 /rps
DynamoDB API compatible
Your applications
DAX
DynamoDB
High performance
Amazon DynamoDB Accelerator (DAX)
- 52. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Write sharding
Handling high velocity writes
- 53. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
, / /10 , / /10 , / /10 , / /10
2, 2,
5 7 C7
0 ) (
- 54. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• e D S
• W
S
• aQ iB
Amazon DynamoDB
Instances
Instance
Amazon Kinesis
Amazon Simple Queue
Service
- 55. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Candidate A_2
Candidate B_1
Candidate B_2
Candidate B_3
Candidate B_5
Candidate B_4
Candidate B_7
Candidate B_6
Candidate A_1
Candidate A_3
Candidate A_4
Candidate A_7 Candidate B_8
Candidate A_6 Candidate A_8
Candidate A_5
- 56. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Candidate A_2
Candidate B_1
Candidate B_2
Candidate B_3
Candidate B_5
Candidate B_4
Candidate B_7
Candidate B_6
Candidate A_1
Candidate A_3
Candidate A_4
Candidate A_7 Candidate B_8
Insert: “CandidateA_” + rand(0, 10)
Candidate A_6 Candidate A_8
Candidate A_5
- 57. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Candidate A_2
Candidate B_1
Candidate B_2
Candidate B_3
Candidate B_5
Candidate B_4
Candidate B_7
Candidate B_6
Candidate A_1
Candidate A_3
Candidate A_4
Candidate A_5
Candidate A_6 Candidate A_8
Candidate A_7 Candidate B_8
Periodic
process
Candidate A
Total: 2.5M
1. Sum
2. Store
- 58. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Ranking System
- 59. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• d B DA b
W A
• W e S A
• L T T A a
3
b A
W
e S A
- 60. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
n
D XI o
kRs
BB D d
G t
G e a G A
I yDm G +
r e DS
R
D
Di
UserID(PK) GameID(SK) Score EventID
Alice 1 1000 a01
Bob 1 2000 b01
Bob 2 1000 b02
Charlie 1 3000 c01
Dan 1 500 d01
GameID(P
K)
Score(SK) UserID EvenetID
1 1000 Alice a01
1 1000 Dan d01
1 2000 Bob b01
1 3000 Charlie c01
2 1000 Bob b01
Table
GSI
- 61. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Amazon Kinesis
Data Firehose
Amazon Athena
Amazon DynamoDB
Amazon ElastiCache
AWS Lambda
Amazon Simple Storage
Service (S3)
Amazon EC2
Amazon Kinesis
Data Streams
•
• ElastiCache DynamoDB Athena
• Elastisearch
DynamoDB
Streams
Redis kinesis
DynamoDB
- 62. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DynamoDB Streams + Lambda
ElastiCache
Kinesis
- 63. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Athena
- 64. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• B Wa H D
•
• -
• e
- 65. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
A Real World Example
“Reality is that which, when you stop believing
in it, does not go away.”
- 66. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Audible eBook Sync Service
• Audible eBooks
• eBook audio product
•
•
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
- 67. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
DynamoDB
•
•
•
- 68. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Access Patterns
# USE CASE
1 CompanionMapping getCompanionMappingsByAsin
2 CompanionMapping getCompanionMappingsByEbookAndAudiobookContentId
3 CompanionMapping getCompanionMappingsFromCache
4 CompanionMapping getCompanionMappings
5 CompanionMapping getCompanionMappingsAvailable
6 AcrInfo getACRInfo
7 AcrInfo getACRs
8 AcrInfo getACRInfos
9 AcrInfo getACRInfosbySKU
10 AudioProduct getAudioProductsForACRs
11 AudioProduct getAudioProducts
12 AudioProduct deleteAudioProductsMatchingSkuVersions
13 AudioProduct getChildAudioProductsForSKU
14 Product getProductInfoByAsins
15 Product getParentChildDataByParentAsins
16 AudioFile getAudioFilesForACR
17 AudioFile getAudioFilesForChildACR
18 AudioFile getAudioFilesByParentAsinVersionFormat
19 AudioFile getAudioFiles
20 AudioFile getAudioFilesForChildAsin
- 69. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Query Conditions
# USE CASE Lookup parameters INDEX Key Conditions Filter Conditions
1 CompanionMapping getCompanionMappingsByAsin audiobookAsin/ebookSku GSI2 GSI-2=ABOOK-ASIN1 None
2 CompanionMapping
getCompanionMappingsByEbookAndA
udiobookContentId
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
deleteAudioProductsMatchingSkuVersi
ons
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#"
17 AudioFile getAudioFilesForChildACR acr, parent_asin Primary Key on table Acr=ABOOKACR1 version=v and format=f
18 AudioFile
getAudioFilesByParentAsinVersionForm
at
parent_asin, version, format GSI1 GSI-1=ABOOK-ASIN1 version=v and format=f
19 AudioFile getAudioFiles sku, version, format GSI2 GSI-2=ABOOK-SKU1 version=v and format=f
20 AudioFile getAudioFilesForChildAsin asin, parent_asin, version, format GSI1 GSI-1=ABOOK-ASIN1 version=v and format=f
- 70. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Primary Table
T
A
B
L
E
Primary Key
Attributes
PK SK (GSI 3)
ABOOKACR1
v0#ABOOKACR1
GSI-1 GSI-2
ABOOK-ASIN1 ABOOK-SKU1
EBOOKACR1
GSI-1 GSI-2
SyncFileAcr ABOOK-ASIN1
ABOOKACR1#TRACK#1
GSI-1 GSI-2
ABOOK-ASIN1 ABOOK-SKU1
ABOOKACR1#TRACK#2
GSI-1 GSI-2
ABOOK-ASIN1 ABOOK-SKU1
EBOOKACR1 EBOOKACR1
GSI-1 EBookAsin
EBOOK-SKU1 ASIN
ASIN Amazon Standard Identification
Number Amazon
10
- 71. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Indexes
G
S
I
1
Partition Key Projected Attributes
ABOOK-ASIN1 ABOOKACR1
ABOOKACR1-v1
ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2
SyncFileAcr ABOOKACR1 MAP-EBOOKACR1
EBOOK-SKU1 ABOOKACR1 EBOOKACR1
G
S
I
2
Partition Key Projected Attributes
ABOOK-ASIN1 ABOOKACR1 MAP-EBOOKACR1
ABOOK-SKU1 ABOOKACR1
ABOOKACR1-v1
ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2
G
S
I
3
GSI Partition Key Projected Attributes
V0#ABOOKACR1 ABOOKACR1 ABOOKACR1-v1
EBOOKACR1 ABOOKACR1 MAP-EBOOKACR1
ABOOKACR1#TRACK#1 ABOOKACR1 ABOOKACR1#TRACK#1
ABOOKACR1#TRACK#2 ABOOKACR1 ABOOKACR1#TRACK#2
EBOOKACR1 ABOOKACR1 EBOOKACR1
- 72. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
• ,B . / w xS e_ NXfdgu V q y Q
a v e
• ,B . L B _ gu V q iPlogz e
Ø t_khnmpjb
B B B = = B L B ? ?B E:H
E ?
Ø LBH H B -2B2
Ø B B = ?B: B B H L B :?B ? B EL
B EB DH EL E BE E H B
• x_ cx b S e_S L B _
• v RRersg dV
- 73. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Q&A
- 74. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
https://amzn.to/aws_dev
- 75. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
Thank you!