What type of database is DynamoDB?
DynamoDB is a fully managed NoSQL database service that supports key-value and document data models.
What are the main data structures used in DynamoDB?
Tables
Items (rows)
Attributes (columns).
What are the primary keys in DynamoDB?
Partition key (hash key)
Partition key + Sort key (composite key).
What is the maximum size of an item in DynamoDB?
400 KB per item.
What read/write capacity modes does DynamoDB support?
Provisioned mode: Pre-defined read/write capacity units (RCUs/WCUs)
On-demand mode: Auto-scales based on traffic
What are the consistency options for reads in DynamoDB?
Eventually consistent reads (default)
Strongly consistent reads
How are read capacity units (RCUs) calculated?
Eventually consistent read: 1 RCU = 8 KB per second.
Strongly consistent read: 1 RCU = 4 KB per second.
How are write capacity units (WCUs) calculated?
1 WCU = 1 write per second for an item up to 1 KB
What types of indexes does DynamoDB support?
Primary index: partition key or composite key
Secondary indexes:
Global Secondary Index (GSI): any attribute, across partitions
Local Secondary Index (LSI): same partition key, different sort key
Can you change a primary key after table creation?
No, you cannot change the primary key.
You must create a new table.
What is DynamoDB Streams?
A time-ordered sequence of item-level changes in a table.
Used for replication, triggers, and analytics.
What is DynamoDB TTL (Time to Live)?
TTL automatically deletes expired items based on a timestamp attribute.
What is the maximum table size for DynamoDB?
DynamoDB tables scale virtually without limit.
You don’t manage partitions manually.
How is high availability achieved in DynamoDB?
Through multi-AZ replication within a region
For cross-region, use Global Tables.
What are DynamoDB Global Tables?
Fully managed, multi-region, multi-master tables for global applications.
Can DynamoDB Global Tables automatically handle conflict resolution?
Yes, using last-writer-wins (timestamp-based) conflict resolution.
How do you design a DynamoDB table for high throughput?
Use evenly distributed partition keys
Avoid hot partitions
Use GSIs/LSIs carefully to optimize queries
How do you efficiently query large datasets?
Use Query instead of Scan wherever possible.
Use pagination for large results.
What is Pagination in DynamoDB ?
Pagination is the process of retrieving large results sets in multiple smaller chunks (pages) instead of all at once.
How do you handle unpredictable traffic spikes?
Use on-demand capacity mode or DAX caching
How can you secure DynamoDB data?
IAM policies for table access
Encryption at rest using AWS KMS
TLS for in-transit encryption
What is DynamoDB Accelerator (DAX)?
Fully managed, in-memory caching service for DynamoDB.
It reduces read latency from milliseconds to microseconds.
Can DAX cache writes as well as reads?
No, DAX only accelerates read operations.
Writes go directly to DynamoDB.
Which DynamoDB feature provides automatic deletion of expired items?
TTL (Time to Live)