The core four · 3 of 4
Storage
Where does the data live?
Todo.io's todos, users and files have to outlive any one server. Level 0 gives you three places to keep data, and which one fits depends on what the data looks like and how you'll ask for it.
The answers at Level 0
S3Unlimited storage for files ("objects") in containers called buckets.A warehouse of labelled boxes you can reach from anywhere.RDSA managed SQL database, like MySQL or PostgreSQL, that AWS runs for you.A filing cabinet with a librarian AWS employs.DynamoDBA fully managed NoSQL database you use through AWS API calls.A giant labelled locker wall where you fetch lockers by their exact key.
Side by side
| S3 | RDS | DynamoDB | |
|---|---|---|---|
| What it keeps | Whole files (objects) in bucketswhy | Rows in related tables, queried with SQLwhy | Items fetched by their key; no joinswhy |
| How the app asks | HTTPS API callswhy | A connection with a username and passwordwhy | Signed HTTPS API calls (GetItem, PutItem)why |
| Who's allowed in | IAM policies and the bucket policywhy | Its security group, then the database passwordwhy | IAM, on every callwhy |
| Where it lives | In one Region, reached over HTTPSwhy | Inside your VPC, in private subnetswhy | Outside your VPC, behind a public endpointwhy |
| Size | Grows as you add objectswhy | You pick an instance classwhy | Nothing to sizewhy |
| How you pay | For what you storewhy | Per second the instance runs (10-minute minimum), plus storagewhy | Per request (on-demand), plus what you storewhy |
See it in a request
What you need to know
Every Level 0 fact about this pillar's words. The exam and quizzes only ask about these.
RDS (Relational Database Service) A managed SQL database, like MySQL or PostgreSQL, that AWS runs for you.
- RDS runs MySQL or PostgreSQL for you: AWS installs, patches and backs it up. You still use SQL and related tables, which is what you want for joins.
- You pay for every second the database instance runs (10-minute minimum), priced by its instance class, plus the storage you provision. It costs money even when nobody is using it.
- Apps connect with a database username and password on the database port (3306 for MySQL), and the database's security group must let the app in.
- RDS runs inside your VPC, in private subnets; DynamoDB doesn't.
- The DB subnet group must cover at least two Availability Zones, even for a single-AZ database, so a standby can be added later.
- CloudTrail sees AWS API calls like
CreateDBInstance, never the SQL run inside the database. The database's own logs record that.
DynamoDB A fully managed NoSQL database you use through AWS API calls.
- Every read and write is a signed HTTPS API call (
GetItem,PutItem,Query) to a public endpoint, approved by IAM. No connections, no passwords, no security groups. - Items are found by their key, so you design tables around how you'll read them. There are no joins. It's ideal for lookups by id at any scale.
- No servers to size or patch: you manage tables, keys and who may access them.
- In on-demand mode you pay per read and write request, plus the data you store. With no traffic there are no request charges.
S3 (Simple Storage Service) Unlimited storage for files ("objects") in containers called buckets.
- S3 is object storage: whole files (objects) in buckets, read and written over HTTPS. Not a disk and not a database; right for pictures and uploads.
- Bucket names are unique across all of AWS, but each bucket's data lives in one Region.
- An object's key is its full name in the bucket, like
pictures/u-123/avatar.png. The slashes are just part of the name. - New buckets are private, with Block Public Access turned on. Who can read is decided by IAM policies and the bucket policy (a resource-based policy).
- S3 grows as you add objects: there's no size to choose, and you pay for what you store.