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

Side by side

S3RDSDynamoDB
What it keepsWhole files (objects) in bucketswhyRows in related tables, queried with SQLwhyItems fetched by their key; no joinswhy
How the app asksHTTPS API callswhyA connection with a username and passwordwhySigned HTTPS API calls (GetItem, PutItem)why
Who's allowed inIAM policies and the bucket policywhyIts security group, then the database passwordwhyIAM, on every callwhy
Where it livesIn one Region, reached over HTTPSwhyInside your VPC, in private subnetswhyOutside your VPC, behind a public endpointwhy
SizeGrows as you add objectswhyYou pick an instance classwhyNothing to sizewhy
How you payFor what you storewhyPer second the instance runs (10-minute minimum), plus storagewhyPer 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.
Open in the glossary →
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.
Open in the glossary →
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.
Open in the glossary →