DynamoDB
Amazon DynamoDB 筆記。
What is DynamoDB?
- Ideal for applications with known access patterns
- Access through APIs/ORMs and authorized through IAM
- Managed NoSQL DB optimized for performance at scale
- Cost effective usage-based payment model
Secondary Indexes
Global Secondary Index (GSI)
An index with a partition key and sort key that can be different from those on the table.
Local Secondary Index (LSI)
An index that has the same partition key as the table, but a different sort key.
Data Types
| Type | Description |
|---|---|
| B | Binary data type (base64-encoded string in JSON) |
| BOOL | Boolean (true or false) |
| BS | Set of binary values |
| L | List of values (can contain different data types) |
| M | Map of attribute name-value pairs |
| N | Number (positive, negative, or zero) |
| NS | Set of number values |
| NULL | Null data type |
| S | String data type |
| SS | Set of string values |