DynamoDB Flashcards
You can select a specific Availability Zone in which to place your DynamoDB Table.
False.
How can you optimise the performance of a large scan in DynamoDb?
Run smaller scans in parallel.
What is some characteristics of DynamoDB?
- NoSQL database that supports both key-value and document data models
- It is a fast, millisecond latency at any scale
- Flexible data model
- Reliable performance
- Serverless
- Can be configured to auto scale
Name a few applications for which DynamoDB is a good choice.
- Mobile apps
- Web
- Gaming
- Ad-tech
- IoT
How is the data stored in DynamoDB?
- Stored on SSD storage
- Spread across 3 geographically distinct data centers
What can documents in DynamoDB be written in?
- JSON
- HTML
- XML
What is used for authentication and access control to a DynamoDB?
IAM
How can you make sure that an user only can access their own data in DynamoDB?
- By adding a Condition to an IAM Policy that checks so that the Partition Key value matches the User ID.
- “dynamodb:LeadingKeys”
DynamoDB supports both Eventually Consistent and Strongly Consistent reads, which it the default?
Eventual Consistency.
In DynamoDB, how can you specify what attributes a query or scan should return?
By specifying the ProjectionExpression parameter.
You’re doing a query on a DynamoDB table, how is the result sorted? Can you change this in any way?
- The result is sorted by the Sort Key
- Numeric order - by default in ascending order (1, 2, 3)
- ASCII character code values
- You can revers the order by setting the ScanIndexForward parameter to false
- Only for queries, not scans
By default, are queries eventual or strongly consistent?
Eventual. If you want Strong Consistency you need to specify it
How can you refine the result of a scan?
- Filter the result.
- Remember that the scan still fetches ALL the data of the table, filter simply filters out what to show you after all data has been fetched
How can you improve the performance of a query or scan?
- Set a smaller page size, this will use fewer read operations
- Try to design the tables in a way so that you can use Query, Get or BatchGetItem instead of Scan
- Parallel scans (not recommended if your table/index is quite busy)
Which are the two pricing models for DynamoDB?
- Provisioned Throughput
- On-Demand Capacity