forked from peorth80/aws-solutions-architect-associate-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
databases-dynamo-db.txt
50 lines (40 loc) · 1.87 KB
/
databases-dynamo-db.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
DynamoDB
- NoSQL database for consistent, single-digit milisecond latency at any scale
- Stored on SSD storage
- Spread across 3 geographically distinct data centers
- Eventually Consistent Reads
- Consistency across all copies of data is uaully reached within a second. Repeating read after short time will return updated data (best read performance)
- Strongly Consistent Reads
- Returns a result that reflects all writes that received a successful response prior to the read
- Autoscalling supported (% target utilization, min/max)
DynamoDB Pricing
- Provisioned Throughput Capacity
- Write Throughput $0.0065 per hour for every 10 units
- Read Throughput $0.0065 per hour for every 50 units
- Storage Costs
- First 25 GB --> Free
- $0.25GB/month
- Free tier: 25 units read / 25 units write
DynamoDB Streams
- Capture changes to DynamoDB for 24 hours. Audit trail like (Add, change (before and after), delete). Use LAMBDA if you want to store the data more than 24 hrs
Max size of each item with attributes: 400KB
BatchWriteItem: 25 items, 16MB
BatchGetItem: 100 items, 16MB
Scan:
Eventual or consistency, add parameter ConsistentRead
Iterator: returns 1MB and LastEvaluatedKey (to paginate)
Data types:
Number, string, binary, boolean, NULL
JSON: stored as document, can create keys and filter by attribute, can update a sub-element, can use document SDK as wrapper (JS)
Indexes:
Global Secondary Index:
Can add up to 5 per table
Local Secondary Index
Can add up to 5 per table, AT CREATION (can't add them later)
10GB PER PARTITION
Security
- Fine granual access control allows users in IAM to access/deny information (table, items or even attributes)
Reserved capacity can be bought at discounted price. Limited to a single region.
Triggers are supported (uses DynamoDB w/Lambda)
Can specify TTL on tables. Needs to have a timestamp
DAX: In memory cache (in SDK Node.js & Java)