DynamoDB Flashcards
How is DynamoDB replicated?
By default, DynamoDB is fully managed and replicated across 3 Availability Zones.
How do you enable Event Driven programming in DynamoDB?
Use DynamoDB Streams
What is the max size of an item/row in DynamoDB?
400KB
What data types are supported in DynamoDB?
- Scalar Types: String, Number, Binary, Boolean, Null
- Document Types: Map, List
- Set Types: String Set, Binary Set, Number Set
What is your first option for a primary key?
A Unique Hash Key / Partition Key
What is your second option for a primary key?
A combination of partition key and a sort key
What is the sort key also known as?
Range key
What is RCU?
Read Capacity Units: throughput for reads
What is WCU?
Write Capacity Units: throughput for writes
Why would you get a “ProvisionedThroughputException”?
If you have temporarily exceeded your throughput limit and used all of the available burst credits.
What should you do if you get a “ ProvisionedThroughputException”?
Use an exponential backoff
Why would you get a “ProvisionedThroughputExceeded Exception”?
Hot keys, too many requests to the same partition or very large items exceeding the WCU/RCU.
What can be done to resolve a “ProvisionedThroughputExceeded Exception”?
- Exponential backoff
- Distributed partition keys
- Dynamo Accelerator (DAX)
What can you do to prevent ProvisionedThroughputExceeded Exceptions
Use Auto Scaling to increase WCU/RCU depending on activity
What command will write to Dynamo
PutItem