Dynobase (@dynobase) header
Dynobase (@dynobase) profile picture

Professional GUI Client for DynamoDB https://teapaw.org/t.co/nqS5b8GVKr

Joined January 2020
Unpopular opinion: don't add DynamoDB GSIs on day one "just in case". Every GSI copies your writes and bills them again. You can add one to a live table any time; it backfills from the base table. Ship with the access patterns you have. Add the index when a real query needs it.
1
119
DynamoDB TTL vs DeleteItem: TTL - free, no write capacity - usually gone within a few days of expiry - expired items still appear in reads DeleteItem - costs write capacity - immediate - supports a condition expression Using TTL? Filter out expired items until it catches up.
1
80
Before you Scan a whole production DynamoDB table: 1. Check size (Scan reads every item) 2. Split it with Segment/TotalSegments 3. Use eventually consistent reads (half the RCU) 4. Pace it so live traffic isn't throttled 5. Save LastEvaluatedKey to resume Huge? Export to S3.
87
Unpopular opinion: dev, staging and prod DynamoDB tables shouldn't share an AWS account. Prefixes like dev-orders are one typo away from a prod write. Separate accounts give each environment its own IAM boundary, quotas and bill. Prefixes are naming. Accounts are isolation.
2
159
What actually happens when you call PutItem in DynamoDB? It reads like "insert a row". It behaves like "replace whatever is at this key". 🧵
1
89
4/ A GSI gets the item only if it has that index's key attributes. If a replace changes an index key, the index does a delete plus a put, and both cost write capacity. With Streams on, you get an INSERT or a MODIFY record.
1
19
5/ ReturnValues on PutItem accepts only NONE or ALL_OLD. ALL_OLD hands back the item you just overwrote. Dynobase's Operation Builder shows the generated code and conditions for a write before you run it.
19
Which DynamoDB limit surprised you first in production? • 400 KB max item size • 1 MB max per Query or Scan page • 25 items per BatchWriteItem call • 10 GB per partition key once a table has an LSI Or one that isn't on this list?
92
What actually happens when you call DeleteItem in DynamoDB? It looks like the simplest write. It still costs capacity, touches your indexes and can leave a trail. 🧵
2
1
2
165
4/ Need to know what you deleted? ReturnValues=ALL_OLD returns the item as it was. With Streams on, the delete also emits a REMOVE record, with the old image if your stream view type includes it.
1
31
5/ Dynobase's Operation Builder builds delete operations for the selected table and shows the generated code and conditions before you run the write.
28
Before you restore a DynamoDB table from a backup or PITR: 1. Pick a new table name (a restore never overwrites) 2. Recreate auto scaling and alarms 3. Re-enable TTL and Streams 4. Re-apply tags and IAM policies 5. Turn PITR on for the new table None of these carry over.
84
Counterintuitive DynamoDB fact: a GSI can throttle writes to your base table. Writes that touch indexed attributes are copied to the GSI. If the index runs short on write capacity, the table write is throttled too. On provisioned tables, give each GSI at least the table's WCU.
1
3
111
What actually happens when you call Query on a DynamoDB table? It isn't "search the table". It's a specific walk through one partition key. The life of one Query, step by step 🧵
1
1
132
4/ FilterExpression runs after the read, so you pay for every item read, matched or not. Cost is the total size read, rounded up to 4 KB: 1 RCU per 4 KB strongly consistent, half that eventually consistent. A projection doesn't lower it.
1
20
5/ On a GSI, reads are always eventually consistent and you only get the attributes the index projects. In Dynobase you pick a table or index and key conditions; it runs a Query when they support one and can generate the SDK or CLI code for it.
19