What is Amazon DynamoDB
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.
Amazon DynamoDB stores three geographically distributed replicas of each table to enable high availability and data durability.
Data is synchronously replicated across 3 facilities (AZs) in a region.
DynamoDB is a serverless service – there are no instances to provision or manage ?
True
How is Data Stored, Medium ?
Data is stored on SSD storage.
Redundacy Strategy ?
Multi-AZ redundancy and Cross-Region Replication option.
DynamoDB is made up of ?
Tables are a collection of items and items are made up of attributes (columns).
Attributes consists of a name and a value or set of values.
Size Limitations
The aggregate size of an item cannot exceed 400KB including keys and all attributes.
Can store pointers to objects in S3, including items over 400KB.
Documents can be written in ?
Documents can be written in JSON, HTML, or XML.
DynamoDB Features ?
Please see attachment
Anti-Patterns
Amazon DynamoDB is not ideal for the following situations ?
Access control Principles
All authentication and access control is managed using IAM.
DynamoDB supports identity-based policies ?
DynamoDB doesn’t support resource-based policies.
You can use a special IAM condition to restrict user access to only their own records.
These resources and subresources have unique Amazon Resource Names (ARNs) , please specify ?
Tablearn:
aws:dynamodb:region:account-id:table:table/name-name
Indexarn
:aws:dynamodb:region:account-id:table:table/name-name/index/index-name
Streamarn:
aws:dynamodb:region:account-id:table:table/name-name/stream/stream-label
Explain Partitions ?
Amazon DynamoDB stores data in partitions.
A partition is an allocation of storage for a table that is automatically replicated across multiple AZs within an AWS Region.
Partition management is handled entirely by DynamoDB—you never have to manage partitions yourself.
DynamoDB allocates sufficient partitions to your table so that it can handle your provisioned throughput requirements.
DynamoDB allocates additional partitions to a table in the following situations ?

Primary Keys principles ?
DynamoDB stores and retrieves data based on a Primary key.
There are two types of Primary key:
Partition key – unique attribute (e.g. user ID).

What is Composite Key ?
Composite key – Partition key + Sort key in combination.

Partitions and Performance Limitations ?
DynamoDB evenly distributes provisioned throughput—read capacity units (RCUs) and write capacity units (WCUs) among partitions
If your access pattern exceeds 3000 RCU or 1000 WCU for a single partition key value, your requests might be throttled.
Partitions and Performance: Reading or writing above the limit can be caused by these issues ?
Best practices for partition keys ?
Use high-cardinality attributes – e.g. e-mailid, employee_no, customerid, sessionid, orderid, and so on.
Use composite attributes – e.g. customerid+productid+countrycode as the partition key and order_date as the sort key.
Cache popular items – use DynamoDB accelerator (DAX) for caching reads.
Add random numbers or digits from a predetermined range for write-heavy use cases – e.g. add a random suffix to an invoice number such as INV00023-04593
What are the Consistency Models ?
DynamoDB supports eventually consistent and strongly consistent reads.
What is Eventually consistent reads ?
When you read data from a DynamoDB table, the response might not reflect the results of a recently completed write operation.
The response might include some stale data.
If you repeat your read request after a short time, the response should return the latest data.
What is Strongly consistent reads ?
DynamoDB uses eventually consistent reads by default.
You can configure strongly consistent reads with the GetItem, Query and Scan APIs by setting the –consistent-read (or ConsistentRead) parameter to “true” ? T/F
That is True
DynamoDB Transactions, what is it ?
Amazon DynamoDB transactions simplify the developer experience of making coordinated, all-or-nothing changes to multiple items both within and across tables.
Transactions provide atomicity, consistency, isolation, and durability (ACID) in DynamoDB.
Enables reading and writing of multiple items across multiple tables as an all or nothing operation.
With the transaction write API ?
With the transaction write API, you can group multiple Put, Update, Delete, and ConditionCheck actions.
You can then submit the actions as a single TransactWriteItems operation that either succeeds or fails as a unit.
There is no additional cost to enable transactions for DynamoDB tables ? T/F
There is no additional cost to enable transactions for DynamoDB tables.
You pay only for the reads or writes that are part of your transaction.