OnCallReadyStart learning

AWS Lesson 38.43 · AWS V: Data, Resilience & the Edge · 7 min read

Choosing the data and edge services, and what keeps them alive

In plain words

After a long workshop, someone pins a map of the toolbox on the wall: which tool for which job. Choose a database by how you will ask questions of the data. Choose a copy by the disaster it has to survive. Choose a network path by who has to reach whom. Then the rule that matters most: do not call anything safe until you have broken it on purpose and watched it come back.

The lesson also tidies the workshop, putting away everything the chapter built so the lab account stays small.

Choosing the data and edge services, and what keeps them alive

This chapter covered a lot of services. In a design review, an incident or an exam question they turn into a handful of decisions. This lesson puts the decisions side by side, lists what each one costs while idle, and cleans up what the chapter built.

Need to know: pick a data store by access pattern and consistency before by product; pick a copy by the failure it must survive; pick an edge or network service by what has to reach what; and never call something resilient before a restore or a failover test has shown it.

Databases: which one

needchoosewhy not the others
relational data, joins, transactions, an existing PostgreSQL appRDS for PostgreSQL (Multi-AZ)DynamoDB has no joins; self-managed EC2 means patching and failover are yours
the same, with many readers, fast failover, storage that grows by itselfAurora PostgreSQLcosts more than RDS; PostgreSQL-compatible rather than PostgreSQL itself
key-value / document at any scale, single-digit ms, no serversDynamoDB (on-demand to start)needs the access patterns known up front; no ad-hoc joins
microsecond reads in front of a database, sessions, rate limitsElastiCache (Valkey) / DAX for DynamoDBa cache is not a system of record
move a database into AWS or between enginesDMS (+ the Schema Conversion Tool for engine changes)a dump and restore means downtime

Copies: by the failure they cover

failurecovered by
a host or an AZMulti-AZ (RDS), Aurora readers, Multi-AZ caches, EFS / S3 (regional by design)
a bad write or a dropped tablepoint-in-time restore (RDS, DynamoDB), S3 versioning, AWS Backup continuous backup
a Regioncross-Region replicas, snapshot / recovery point copies, S3 CRR, DynamoDB global tables, Aurora Global Database
a compromised account or ransomwarecopies in another account, Object Lock / Vault Lock in compliance mode
"we do not know if it works"restore tests, failover tests, game days

Which DR strategy to run on top (backup and restore, pilot light, warm standby, multi-site) is a cost-versus-RTO decision: the architecture chapter after this one works through it.

The edge and the network: what has to reach what

needuse
send users to a healthy endpoint, a closer Region, a share of trafficRoute 53 routing policies + health checks
cache static and dynamic content close to users, TLS at the edge, hide the originCloudFront (+ OAC for S3)
filter HTTP attacks and abusive clientsWAF on CloudFront / ALB / API Gateway (+ Shield Advanced)
static anycast IPs, fast TCP/UDP failover across RegionsGlobal Accelerator
two VPCs, cheaplyVPC peering
many VPCs, VPNs, Direct Connect, one hubTransit Gateway
one service to many VPCs / accounts, overlapping CIDRsPrivateLink
the data centreSite-to-Site VPN (quick) / Direct Connect (dedicated), ideally both

What it costs while nobody uses it

Some of these services bill by the hour whether traffic flows or not: RDS instances (twice for Multi-AZ) and their storage, RDS Proxy, ElastiCache nodes, NAT gateways, Transit Gateway attachments, VPN connections, Direct Connect ports, interface endpoints, and Shield Advanced. Others bill by use: DynamoDB on-demand, S3, CloudFront, Lambda. Snapshots and recovery points bill for their storage until they expire. Tag everything (team, env, service, and the backup tag the plan selects), and let lifecycle rules and backup retention delete what nobody needs.

$ aws rds describe-db-instances --query 'DBInstances[].[DBInstanceIdentifier,DBInstanceStatus]' --output text
$ aws dynamodb list-tables --query 'TableNames' --output text
$ aws ec2 describe-transit-gateways --query 'TransitGateways[?State!=`deleted`].TransitGatewayId' --output text
$ aws cloudfront list-distributions --query 'DistributionList.Items[].Id' --output text
None

Once every lab of this chapter is done, opening this lesson removes what the chapter built (the lessons' and labs' databases, tables, caches, file systems, distributions, gateways and VPN), so the lab account stays small. The listings above then come back empty; CloudFront prints None, because an account with no distributions gets a list with no Items at all, and a --query on a missing key gives null.

On the exam (SAA-C03 2.2 and 3.3, SOA-C03 2.2, CLF-C02 3.4): match the failure to the copy (AZ = Multi-AZ, data corruption = point-in-time restore, Region = cross-Region copies or replicas, account = another account plus a lock), the access pattern to the database (relational = RDS / Aurora, key-value at scale = DynamoDB, repeated reads = ElastiCache / DAX), and the reachability need to the network service (peering, Transit Gateway, PrivateLink, VPN, Direct Connect).

In an interview: "How do you know a system is resilient?" - "Because it has failed in a test and come back within its RTO and RPO: a forced RDS failover with the clients watching, a restore from the newest backup into a sandbox with the time recorded, a DNS failover with the primary stopped, and the alarms that told us about each. Until then it is a diagram."

You can now: choose a database, a copy, an edge service and a network service from the requirement, say what each costs while idle, and check that the lab account is clean again.

Why it helps

Design reviews, incidents and exam questions all turn these services into a handful of decisions. Seeing them side by side, with what each choice costs and which failure it covers, is what lets you answer "which one and why" quickly and defend it.

It also lists what bills by the hour while nobody uses it, which is how idle databases, gateways and VPN connections end up on the invoice, and why tags, lifecycle rules and backup retention belong in every design.

Commands in this lesson

aws

FAQ

How do I choose between RDS, Aurora and DynamoDB?

By access pattern and consistency first. Relational data with joins and transactions, or an existing PostgreSQL application: RDS for PostgreSQL, Multi-AZ. The same with many readers, fast failover and storage that grows by itself: Aurora, at a higher price. Key-value or document access at any scale with known access patterns: DynamoDB, on-demand to start.

Which copy covers which failure?

A host or an AZ: Multi-AZ, Aurora readers, Multi-AZ caches, and EFS and S3, which are regional by design. A bad write or a dropped table: point-in-time restore, S3 versioning, continuous backup. A Region: cross-Region replicas and copies, S3 CRR, global tables. A compromised account: copies in another account under Object Lock or Vault Lock in compliance mode.

What keeps billing while nobody uses it?

Everything billed by the hour: RDS instances (twice for Multi-AZ) and their storage, RDS Proxy, ElastiCache nodes, NAT gateways, Transit Gateway attachments, VPN connections, Direct Connect ports, interface endpoints and Shield Advanced. Snapshots and recovery points bill for storage until they expire. DynamoDB on-demand, S3 and CloudFront bill by use.

Why are the listings empty after this lesson?

Once every lab of the chapter is done, opening the review lesson removes what the chapter built: databases, tables, caches, file systems, distributions, gateways and the VPN. The listings then come back empty; CloudFront prints None, because an account with no distributions returns a list without Items, and a --query on a missing key gives null.

Where do DR strategies such as pilot light and warm standby come in?

Choosing between backup and restore, pilot light, warm standby and multi-site active-active is a cost-versus-RTO decision, and the architecture chapter after this one works through it. This chapter builds the parts those strategies stand on: replicas, backups, copies in other Regions and accounts, and DNS failover.

In an interview Mid

How do you know a system is resilient?

Because it has failed in a test and come back within its RTO and RPO. A forced RDS failover with the clients watching, to prove the pools reconnect. A restore from the newest backup into a sandbox with the time recorded. A DNS failover with the primary stopped, read with test-dns-answer. A DynamoDB or S3 restore that the application's own checks accept. And the alarms that told us about each one. Until then it is a diagram: copies matched to the failure they cover, but unproven.

Also asked: How would you choose between RDS and DynamoDB for a new service? · Which AWS services keep billing while nobody uses them? · What would you test before calling a system resilient?

Practise this lesson in the terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.