Ravi Sir's Cards › AWS
Query vs Scan
What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.
Read card text
What this card says
Why do we need it?
Scan feels easy and becomes a bill shock.
What is it?
Query uses PK (and optional SK). Scan reads the table; you pay for examined items.
How to do it
Always design a key that lets you Query. Use Scan only for tiny labs or rare admin jobs.
KeyConditionExpression
Example
List notes for user 7 → Query PK=7. Scan whole table → expensive.