22. DynamoDB **IMPORTANT** Flashcards
What is the maximum size of an item in DynamoDB?
400 KB
What are the DynamoDB Primary Key options?
- Simple Primary Key (Partition key only / HASH)
- Composite Primary Key (Partition key + Sort key – combination must be unique)
If we write 6 objects per second of 4.5 KB each, how many WCUs are required?
6 * 5 = 30 WCU
4.5 KB was rounded to nearest KB (5 KB)
If we have 10 strongly consistent reads per second of 6 KB each, how many RCUs are required?
10 * (8 / 4) = 20 RCU
6 KB was rounded to nearest multiple of 4 (8 KB)
If we have 16 eventually consistent reads per second of 12 KB each, how many RCUs are required?
(16 / 2) * (12 / 4) = 8 * 3 = 24 RCU
How are WCU and RCU spread between partitions?
Evenly
WCU and RCU are spread evenly between partitions
ex: 10 partitions w/100 WCU & RCU –> each partition gets 10 WCU & 10 RCU
When can SLI be defined?
Local Secondary Index (LSI) must be defined at table creation time.
When should you use a Global Secondary Index (GSI)?
When you want to speed up queries on non-key attributes
What are the BatchWriteItem limits?
- up to 25 PutItem and/or DeleteItem in one call
- up to 16 MB of data written
- up to 400 KB of data per item
What are the BatchGetItem limits?
- up to 100 items
- up to 16 MB of data
What type of locking does DynamoDB institute?
DynamoDB is an optimist locking / concurrency database
What is DAX?
A seamless cache for DynamoDB (no application re-write required)
What are the DynamoDB stream types?
- KEYS_ONLY
- NEW_IMAGE
- OLD_IMAGE
- NEW_AND_OLD_IMAGES
True or False: Lambda functions are invoked synchronously from DynamoDB Streams.
True.
Lambda functions are invoked synchronously from DynamoDB Streams.
What DynamoDB API options use NextToken?
- -max-items
- -starting-token