AWS Cloud & DevOps Tutorial 0/70 lessons ~6 min read Lesson 10

    Databases and Caching on AWS

    Learner progress is not a JSON file on an instance and not an object key alone. It is structured state: which lesson was completed, what score was earned, which certificate is owed

    Course progress0%
    Focus
    15 guided sections
    Practice signal
    Examples included
    Career prep
    Interview Q&A included

    Databases and Caching on AWS

    AWS Cloud & DevOps Engineering · Lesson 10 · AWS Cloud Foundations

    Lesson Overview

    Learner progress is not a JSON file on an instance and not an object key alone. It is structured state: which lesson was completed, what score was earned, which certificate is owed, which attempt is in flight. Files from Storage Services: S3, EBS and EFS hold assets; databases hold the facts the Monday board aggregates. Caching holds the hot facts so the board does not ask the database forty times for the same completion percentage.

    This lesson is a foundations survey of Amazon RDS, Amazon Aurora, Amazon DynamoDB, and Amazon ElastiCache: what each is for, how backups and replicas appear at a high level, and how to choose without pretending Module 5’s operations deep dive is already done. RDS, Aurora and DynamoDB Operations will own patches, failover drills, and capacity craft. Here you build a decision matrix for a commerce-like learning platform and refuse to run an unbacked single-AZ database as “temporary production.”

    Learning Objectives

    By the end of this lesson you will be able to:

    1. Place relational versus key-value versus cache roles in TechLearningPro’s architecture.
    2. Explain what RDS manages for you versus what you still own.
    3. Describe Aurora as a cloud-native relational option related to the RDS family.
    4. Explain DynamoDB’s serverless key-value model and primary key thinking at intro depth.
    5. Position ElastiCache (Redis or Memcached engines as offered) as a cache, not the system of record.
    6. Sketch multi-AZ and read replica ideas without inventing undocumented behavior.
    7. Include backup retention and restore awareness in every database decision.
    8. Apply network least privilege: database security groups only from app tiers.
    9. Build a data-store decision matrix for a commerce-style application.
    10. Budget and clean up lab database instances and cache nodes that bill hourly.

    Prerequisites

    • Lessons 7–9 for private subnets, security groups, and where not to put durable state.
    • IAM for authentication options awareness (IAM DB auth exists; secrets belong in later secrets lessons).
    • Budget alert before creating RDS or cache nodes—these are easy to forget and expensive relative to a tiny EC2 lab.

    Detailed Core Concepts

    The Monday board’s data path

    The board asks: for this org, what percent complete is course X? That answer should come from a store with transactions or carefully designed atomic updates, backed up, and reachable only from the progress API. A cache may hold the computed percentage for seconds or minutes. If the cache dies, the database answers more slowly. If the database dies and there is no multi-AZ or restore story, Monday dies.

    Amazon RDS

    RDS managed relational engines (MySQL, PostgreSQL, MariaDB, SQL Server, Oracle—as available in your Region and license model) automate provisioning, patching windows, automated backups, and Multi-AZ synchronous standby for many engines. You still design schema, queries, parameter groups carefully, and security groups. Foundations default for TechLearningPro’s relational progress and enrollment data is often PostgreSQL on RDS or Aurora PostgreSQL—confirm team standards.

    Single-AZ vs Multi-AZ: Single-AZ is for non-production or explicitly accepted risk. Multi-AZ provides a standby for failover. Failover is not zero downtime; applications need reconnect logic. Read replicas scale read traffic and can assist some DR patterns; replication lag is real—do not send strongly consistent reads to a lagging replica without care.

    Backups: automated backups and snapshots. Know retention settings and that deleting an instance can delete automated backups depending on options—read the delete dialog. Test restore in sandbox.

    Amazon Aurora

    Aurora is a relational engine offering compatible with MySQL and PostgreSQL editions, with a storage architecture designed for cloud replication and failure handling. Aurora clusters have writer and reader endpoints. Serverless variants exist for variable workloads—verify current Aurora Serverless versions and behavior in docs. Use Aurora when its operational and performance model fits; it is not automatic magic for bad queries. Module 5 deepens failover and storage.

    Amazon DynamoDB

    DynamoDB is a fully managed key-value and document database with single-digit millisecond design goals at scale, on-demand or provisioned capacity modes, and regional durability characteristics described in AWS documentation. Access is by primary key (partition key, optional sort key). Secondary indexes support alternate patterns. It shines for session stores, feature flags, leaderboards, shopping carts, and progress records that fit key design. It is a poor fit for ad hoc multi-table relational analytics without thoughtful export to analytics stores.

    Streams, TTL, global tables appear in later design; foundations need awareness that TTL expires items and that multi-Region tables are a deliberate choice with conflict considerations.

    Amazon ElastiCache

    ElastiCache runs Redis or Memcached compatible engines as managed clusters (product names and node types evolve—check current docs). Use as a cache or ephemeral fast store: session cache, computed board fragments, rate-limit counters. Do not make ElastiCache the only copy of certificate eligibility. Persistence options on Redis-style engines are not a substitute for a designed system of record without careful review. Security groups, encryption in transit/at rest options, and auth tokens/users must be configured; default-open caches are a classic breach pattern.

    Choosing without brand loyalty

    NeedLean toward
    Relational enrollments, purchases, strong joinsRDS/Aurora
    High-scale key lookups, simple progress itemsDynamoDB
    Hot repeated reads of computed resultsElastiCache in front of DB
    Heavy analytics across yearsWarehouse/lake later modules—not OLTP misuse
    Lift-and-shift Oracle/SQL ServerRDS engine support + licensing reality

    Commerce example: orders and payments relational; shopping cart DynamoDB or Redis with care; product images S3; product metadata relational or document; session cache ElastiCache.

    Architecture and Design Diagrams

    mermaid
    flowchart LR
    API["Progress API"] --> Cache["ElastiCache"]
    API --> RDS["RDS / Aurora\nenrollments progress"]
    API --> DDB["DynamoDB\nsessions feature flags"]
    API --> S3["S3 assets"]
    Cache -->|"miss"| RDS
    text
    Client → API → (cache?) → system of record → response
    ↘ on miss, fill cache with TTL

    Technical Explanation

    Connection pooling and failover awareness

    ASG instances each open database connections. Without pooling and max-connection planning, scale-out knocks over the database. RDS Proxy exists as a managed pooler for some engines—awareness now, depth later. On failover, DNS for the endpoint moves; clients must retry. Caches should fail open or closed deliberately: fail open means more DB load; fail closed means errors. Pick per feature.

    Encryption and network

    Encrypt storage; use TLS to databases where supported; place databases in private subnets; allow SG from sg-app only; prefer no public accessibility. IAM authentication and Secrets Manager rotation appear in later lessons—do not hardcode passwords in AMIs or user data.

    DynamoDB keys for progress (illustrative)

    Partition key LEARNER#<id>, sort key COURSE#<id>#LESSON#<id> can store completion items. Query a learner’s course progress with a sort key prefix. This is illustrative modeling, not a mandated schema. Bad key design creates hot partitions; Module 5 discusses mitigation.

    Cache invalidation

    When progress writes succeed, invalidate or update the cache key for that learner/course. TTL alone means the board can be stale until expiry. Monday demos that require second-accurate completion should not rely on a ten-minute TTL without a write-through or purge.

    Practical Implementation or Design Walkthrough

    Problem

    Create a decision matrix for a commerce-like TechLearningPro checkout plus progress system. Optionally create a small RDS instance or DynamoDB table in sandbox to practice SG and IAM, then clean up immediately. Prefer design-first if account limits block RDS—document why.

    Matrix columns

    Workload, consistency needs, access pattern, size/scale guesses, backup/DR, proposed AWS service, rejected alternatives, cost risk notes (no fake prices), security notes.

    Optional lab

    1. Budget alert. 2. Subnet group in private subnets. 3. sg-data allowing 5432 from sg-app only. 4. Smallest RDS PostgreSQL single-AZ for lab with encryption, 1-day backup retention, publiclyAccessible=false. 5. Connect from app instance via SSM. 6. Snapshot, delete instance with final snapshot then delete snapshot in cleanup—or delete without retention if policy allows lab waste avoidance. 7. Optional: DynamoDB on-demand table put/get; delete table. 8. Optional: cache node—often skip if budget tight; write why.

    Enterprise Real-World Scenarios

    Single-AZ “staging” that grew learners

    A staging RDS instance became the de facto production for a pilot cohort. Disk filled; no Multi-AZ; backups retained one day. Pilot success became an outage. Move to Multi-AZ or Aurora with tested restore; never let pilot DNS stay on staging without a promotion checklist.

    Cache as source of truth

    Eligibility for certificates stored only in Redis. Cache flush before a marketing event erased eligibility until rebuild from incomplete logs. Rebuild took hours. Fix: database as source of truth; cache disposable.

    DynamoDB scan on the board

    A board feature scanned the entire progress table each Monday. Bills and latency exploded. Fix: aggregate tables or relational warehouse export; query by key; never scan as a dashboard strategy.

    Best Practices

    • Private subnets; SG from app only; no public DB.
    • Encrypt at rest and in transit.
    • Multi-AZ for production relational systems that claim reliability.
    • Automated backups on; test restore.
    • Cache is optional acceleration, not the ledger.
    • Model DynamoDB access patterns before tables.
    • Connection limits and pooling planned with ASG max.
    • Secrets not in git or user data.
    • Tag DB and cache resources; budget alarms.
    • Prefer managed services over self-managed DB on EC2 for foundations production paths.
    • Document RPO/RTO targets even if Module 5 refines them.
    • Clean up lab instances the same day.
    • Separate analytics from OLTP.
    • Watch replica lag before routing critical reads.
    • Deny “temporary” public accessibility checkboxes.

    Common Mistakes and Anti-Patterns

    Publicly accessible RDS with weak passwords. Breach pattern. Private only.

    ElastiCache open to VPC CIDR. Data leak and ransomware foothold.

    Single-AZ production. Unnecessary risk.

    Scans for dashboards on DynamoDB. Cost and latency.

    Schema-less chaos in relational “because Agile.” Still need migrations.

    Ignoring backup retention on delete. Surprise unrecoverable delete.

    Using cache TTL as the only consistency story for certificates. Stale or lost truth.

    Oversized lab instances left running. Cost incident.

    Self-managed Postgres on one EC2 “to learn” in production account. Learning belongs in sandbox; production uses managed services unless you truly own ops.

    Cross-Region replica assumed instant DR without failover practice. Test.

    Troubleshooting and Design Review

    Too many connections. ASG scaled; lower max, add pooling/proxy, fix leaks.

    Failover application errors. Client retry/backoff; DNS TTL; connection handling.

    Cache stampede. Soft TTL, singleflight, or serve stale briefly.

    Access denied to DynamoDB. IAM policy on role; wrong table ARN; KMS.

    Slow relational queries. Indexes, explain plans—not only larger instance class.

    Design review: system of record clear? Cache disposable? Multi-AZ? Backup restore tested? SG least privilege? Lab cleaned?

    Interview Questions and Answers

    Q1. RDS vs DynamoDB for learner progress?

    If you need rich relational queries and transactions across enrollments and payments, lean RDS/Aurora. If access is primarily key-based at high scale, DynamoDB can fit. Many platforms use both.

    Q2. What does Multi-AZ buy on RDS?

    A standby for high availability failover in the Region, not a read scaling feature by itself (readers are separate).

    Q3. Why is ElastiCache not enough for progress?

    Volatility, flush risk, and rebuild complexity. It accelerates reads; the database stores truth.

    Q4. What is a read replica for?

    Scaling reads and some DR patterns, with lag. Not blindly for strong consistency reads.

    Q5. Aurora vs RDS in one line?

    Aurora is a cloud-native relational offering with a distinct storage/replication architecture and cluster endpoints; RDS also manages traditional engine deployments. Choose based on requirements and ops model.

    Q6. On-demand vs provisioned DynamoDB?

    On-demand for variable/unknown traffic; provisioned with autoscaling for steady predictable traffic—verify current guidance and cost models on the price card.

    Q7. How do security groups protect databases?

    Allow only application SG sources on DB ports; deny public accessibility; combine with IAM and encryption.

    Q8. What happens on RDS failover to the app?

    Brief disruption; connections drop; app must reconnect to the endpoint. Test it.

    Q9. Hot partition concept?

    Too much traffic on one partition key value. Design keys to distribute; Module 5 deepens.

    Q10. Where do backups of RDS live conceptually?

    Automated backups/snapshots managed by the service with retention you configure; test restores to prove them.

    Q11. Can you use DynamoDB for the entire LMS?

    Possibly for some designs; analytics, complex joins, and reporting often still need other stores. Be honest about access patterns.

    Q12. What must Module 5 still teach?

    Patching, parameter tuning, blue/green database deploys, deep failover drills, capacity units craft, and operational runbooks.

    Hands-On Exercises

    Exercise: Commerce + learning decision matrix

    Build the matrix for checkout, cart, progress, sessions, certificates metadata, and media pointers. Optional tiny RDS or DynamoDB lab with cleanup. Budget first.

    Assessment areaWeight
    Matrix quality30%
    Correct system of record vs cache20%
    Security group / private design15%
    Backup/restore awareness15%
    Module 5 scope humility10%
    Budget and cleanup10%

    Challenge

    Add multi-Region requirements for read-only course catalog versus Region-primary progress writes. Explain why that split appears, without implementing global tables in the lab unless prepared to clean up.

    Modeling enrollments versus events

    Enrollments and payment records usually want relational constraints: a learner cannot be enrolled twice in conflicting ways without a business rule, foreign keys can protect integrity, and joins with invoices matter for commerce. Progress events might stream into DynamoDB or into relational tables depending on query needs. A hybrid is normal: RDS for money and enrollment, DynamoDB for high-churn session and feature flags, S3 for receipts PDFs, ElastiCache for the hot board fragment. The anti-pattern is forcing everything into one service because the team only knows one API.

    Backup restore game day (foundations scale)

    Once a quarter is ideal; for this course, once in sandbox is mandatory if you create RDS. Restore a snapshot to a new instance in a private subnet, point a non-prod app config at it, verify a known learner row, then destroy. Time the process. That time is the beginning of RTO talk. If you never restore, you have a backup theater program.

    Parameter groups and maintenance windows awareness

    RDS parameter groups tune engine settings; defaults are a starting point. Maintenance windows schedule automatic changes. Foundations operators should know where to look, not randomly lower max_connections without measuring. Module 5 will treat parameter changes as change-controlled events.

    DynamoDB capacity mode literacy

    On-demand absorbs spiky Monday traffic with request-based billing. Provisioned sets read/write capacity with autoscaling policies. Neither excuses a table scan. Pick mode based on traffic shape; revisit when the board’s traffic becomes predictable. Global secondary indexes have their own capacity considerations—design indexes from queries, not from “maybe we’ll need it.”

    ElastiCache eviction and memory

    When memory is full, eviction policies decide what disappears. If certificate eligibility lived only in cache, eviction becomes data loss. If board HTML fragments disappear, the database recomputes. Choose TTL and maxmemory policies intentionally. Monitor eviction counts as a product signal, not only an infra metric.

    Security: public accessibility checkbox

    The RDS console checkbox for public accessibility has caused endless incidents. Leave it false. If a reporting tool needs access, use VPN, bastion/SSM port forward patterns carefully, or a properly designed analytics export—not a public 5432. Combine with SG deny-by-default.

    Commerce matrix worked example sketch

    Cart: DynamoDB with TTL on abandoned carts or Redis with persistence caveats—prefer DynamoDB for durability of cart intent. Orders: RDS/Aurora transactional. Payment tokens: never store raw card data; use a payment provider; store references only. Inventory for physical goods: relational. Progress: relational or DynamoDB per access pattern. Session: ElastiCache or DynamoDB. Product images: S3. Product search: later OpenSearch lessons if needed—not OLTP misuse.

    Failure injection thinking

    Disable cache security group briefly in staging: does the API slow or fail hard? Reboot the RDS instance in a maintenance exercise: does the app retry? Delete a DynamoDB item category in a test table: does the UI handle missing? These drills teach more than reading FAQs.

    Cost drivers without fake prices

    RDS/Aurora: instance hours, storage, I/O patterns, backup storage, Multi-AZ duplication of compute. DynamoDB: reads/writes or on-demand request units, storage, optional features like PITR and global tables. ElastiCache: node hours and node sizes. Data transfer. The usual waste: oversized multi-AZ left from a load test; idle ElastiCache; DynamoDB provisioned high 24/7 for a Monday-only spike without autoscaling or on-demand. Lesson 11 frames budgets; delete labs now.

    IAM database authentication awareness

    Some engines support IAM auth for DB users, reducing password sprawl. It is not enabled by magic; applications must obtain tokens. Secrets Manager rotation is another path. Foundations: never bake static passwords into launch templates; prefer secrets injection patterns introduced later.

    Read replica lag story

    A Monday board pointed at a replica to “save the primary.” Replica lag hit seconds under write load from grading jobs. Instructors saw stale completion. Fix: critical board reads on primary or on a replica with lag monitoring and SLO, or precomputed aggregates updated transactionally. Replicas are not free consistency.

    Aurora endpoints

    Writer endpoint for writes; reader endpoint for read scaling. Applications that hardcode an instance endpoint fight failover. Use cluster endpoints as documented. Serverless scaling has cold start and scaling rate behaviors to validate for interactive APIs before committing the board.

    When self-managed EC2 databases are justified

    Rare special engines, exotic extensions, or existing heavy operational maturity. For TechLearningPro greenfield, prefer managed. If you self-manage, you own backup, patching, failover, and monitoring—Module 5 topics without the managed guardrails. Do not self-manage to “save money” without full cost of people.

    Caching layers in front of DynamoDB and RDS

    Cache-aside: read cache, on miss read DB, fill cache. Write-through: write DB and cache together. Write-behind: dangerous for money and certificates without strong discipline. Prefer cache-aside for foundations progress reads with explicit invalidation on write.

    Lab cleanup specifics

    Delete ElastiCache replication groups/clusters, delete RDS instances and any final snapshots you do not need, delete subnet groups if unused, delete DynamoDB tables, remove SG rules that existed only for the lab, confirm bills. Snapshot left “just in case” becomes forever cost—set a calendar delete.

    Tie-back to compute and storage

    ASG max must consider DB connections. S3 holds objects referenced by DB keys. EFS should not hold the relational datadir. Security groups from lesson 7 are the DB’s front door. Well-Architected in lesson 11 will ask whether you tested restore—answer with a date.

    Healthcare and privacy note

    Learner data may be personal data. Databases need encryption, access logging where required, least privilege, and retention aligned with policy. Foundations does not replace legal advice; it refuses cleartext public databases as a starting point.

    Knowledge check reinforcement

    System of record? Backup tested? Cache disposable? Private networking? Engine choice matched to access pattern? Module 5 backlog listed? If any answer is shrug, the design is not ready for Monday traffic.

    Extended practice note 1

    Modeling enrollments versus events

    Enrollments and payment records usually want relational constraints: a learner cannot be enrolled twice in conflicting ways without a business rule, foreign keys can protect integrity, and joins with invoices matter for commerce. Progress events might stream into DynamoDB or into relational tables depending on query needs. A hybrid is normal: RDS for money and enrollment, DynamoDB for high-churn session and feature flags, S3 for receipts PDFs, ElastiCache for the hot board fragment. The anti-pattern is forcing everything into one service because the team only knows one API.

    Extended practice note 2

    Backup restore game day (foundations scale)

    Once a quarter is ideal; for this course, once in sandbox is mandatory if you create RDS. Restore a snapshot to a new instance in a private subnet, point a non-prod app config at it, verify a known learner row, then destroy. Time the process. That time is the beginning of RTO talk. If you never restore, you have a backup theater program.

    Extended practice note 3

    Parameter groups and maintenance windows awareness

    RDS parameter groups tune engine settings; defaults are a starting point. Maintenance windows schedule automatic changes. Foundations operators should know where to look, not randomly lower max_connections without measuring. Module 5 will treat parameter changes as change-controlled events.

    Extended practice note 4

    DynamoDB capacity mode literacy

    On-demand absorbs spiky Monday traffic with request-based billing. Provisioned sets read/write capacity with autoscaling policies. Neither excuses a table scan. Pick mode based on traffic shape; revisit when the board’s traffic becomes predictable. Global secondary indexes have their own capacity considerations—design indexes from queries, not from “maybe we’ll need it.”

    Extended practice note 5

    ElastiCache eviction and memory

    When memory is full, eviction policies decide what disappears. If certificate eligibility lived only in cache, eviction becomes data loss. If board HTML fragments disappear, the database recomputes. Choose TTL and maxmemory policies intentionally. Monitor eviction counts as a product signal, not only an infra metric.

    Extended practice note 6

    Security: public accessibility checkbox

    The RDS console checkbox for public accessibility has caused endless incidents. Leave it false. If a reporting tool needs access, use VPN, bastion/SSM port forward patterns carefully, or a properly designed analytics export—not a public 5432. Combine with SG deny-by-default.

    Extended practice note 7

    Commerce matrix worked example sketch

    Cart: DynamoDB with TTL on abandoned carts or Redis with persistence caveats—prefer DynamoDB for durability of cart intent. Orders: RDS/Aurora transactional. Payment tokens: never store raw card data; use a payment provider; store references only. Inventory for physical goods: relational. Progress: relational or DynamoDB per access pattern. Session: ElastiCache or DynamoDB. Product images: S3. Product search: later OpenSearch lessons if needed—not OLTP misuse.

    Extended practice note 8

    Failure injection thinking

    Disable cache security group briefly in staging: does the API slow or fail hard? Reboot the RDS instance in a maintenance exercise: does the app retry? Delete a DynamoDB item category in a test table: does the UI handle missing? These drills teach more than reading FAQs.

    Extended practice note 9

    Cost drivers without fake prices

    RDS/Aurora: instance hours, storage, I/O patterns, backup storage, Multi-AZ duplication of compute. DynamoDB: reads/writes or on-demand request units, storage, optional features like PITR and global tables. ElastiCache: node hours and node sizes. Data transfer. The usual waste: oversized multi-AZ left from a load test; idle ElastiCache; DynamoDB provisioned high 24/7 for a Monday-only spike without autoscaling or on-demand. Lesson 11 frames budgets; delete labs now.

    Extended practice note 10

    IAM database authentication awareness

    Some engines support IAM auth for DB users, reducing password sprawl. It is not enabled by magic; applications must obtain tokens. Secrets Manager rotation is another path. Foundations: never bake static passwords into launch templates; prefer secrets injection patterns introduced later.

    Extended practice note 11

    Read replica lag story

    A Monday board pointed at a replica to “save the primary.” Replica lag hit seconds under write load from grading jobs. Instructors saw stale completion. Fix: critical board reads on primary or on a replica with lag monitoring and SLO, or precomputed aggregates updated transactionally. Replicas are not free consistency.

    Extended practice note 12

    Aurora endpoints

    Writer endpoint for writes; reader endpoint for read scaling. Applications that hardcode an instance endpoint fight failover. Use cluster endpoints as documented. Serverless scaling has cold start and scaling rate behaviors to validate for interactive APIs before committing the board.

    Extended practice note 13

    When self-managed EC2 databases are justified

    Rare special engines, exotic extensions, or existing heavy operational maturity. For TechLearningPro greenfield, prefer managed. If you self-manage, you own backup, patching, failover, and monitoring—Module 5 topics without the managed guardrails. Do not self-manage to “save money” without full cost of people.

    Extended practice note 14

    Caching layers in front of DynamoDB and RDS

    Cache-aside: read cache, on miss read DB, fill cache. Write-through: write DB and cache together. Write-behind: dangerous for money and certificates without strong discipline. Prefer cache-aside for foundations progress reads with explicit invalidation on write.

    Extended practice note 15

    Lab cleanup specifics

    Delete ElastiCache replication groups/clusters, delete RDS instances and any final snapshots you do not need, delete subnet groups if unused, delete DynamoDB tables, remove SG rules that existed only for the lab, confirm bills. Snapshot left “just in case” becomes forever cost—set a calendar delete.

    Extended practice note 16

    Tie-back to compute and storage

    ASG max must consider DB connections. S3 holds objects referenced by DB keys. EFS should not hold the relational datadir. Security groups from lesson 7 are the DB’s front door. Well-Architected in lesson 11 will ask whether you tested restore—answer with a date.

    Extended practice note 17

    Healthcare and privacy note

    Learner data may be personal data. Databases need encryption, access logging where required, least privilege, and retention aligned with policy. Foundations does not replace legal advice; it refuses cleartext public databases as a starting point.

    Extended practice note 18

    Knowledge check reinforcement

    System of record? Backup tested? Cache disposable? Private networking? Engine choice matched to access pattern? Module 5 backlog listed? If any answer is shrug, the design is not ready for Monday traffic.

    Extended practice note 19

    Modeling enrollments versus events

    Enrollments and payment records usually want relational constraints: a learner cannot be enrolled twice in conflicting ways without a business rule, foreign keys can protect integrity, and joins with invoices matter for commerce. Progress events might stream into DynamoDB or into relational tables depending on query needs. A hybrid is normal: RDS for money and enrollment, DynamoDB for high-churn session and feature flags, S3 for receipts PDFs, ElastiCache for the hot board fragment. The anti-pattern is forcing everything into one service because the team only knows one API.

    Extended practice note 20

    Backup restore game day (foundations scale)

    Once a quarter is ideal; for this course, once in sandbox is mandatory if you create RDS. Restore a snapshot to a new instance in a private subnet, point a non-prod app config at it, verify a known learner row, then destroy. Time the process. That time is the beginning of RTO talk. If you never restore, you have a backup theater program.

    Extended practice note 21

    Parameter groups and maintenance windows awareness

    RDS parameter groups tune engine settings; defaults are a starting point. Maintenance windows schedule automatic changes. Foundations operators should know where to look, not randomly lower max_connections without measuring. Module 5 will treat parameter changes as change-controlled events.

    Extended practice note 22

    DynamoDB capacity mode literacy

    On-demand absorbs spiky Monday traffic with request-based billing. Provisioned sets read/write capacity with autoscaling policies. Neither excuses a table scan. Pick mode based on traffic shape; revisit when the board’s traffic becomes predictable. Global secondary indexes have their own capacity considerations—design indexes from queries, not from “maybe we’ll need it.”

    Extended practice note 23

    ElastiCache eviction and memory

    When memory is full, eviction policies decide what disappears. If certificate eligibility lived only in cache, eviction becomes data loss. If board HTML fragments disappear, the database recomputes. Choose TTL and maxmemory policies intentionally. Monitor eviction counts as a product signal, not only an infra metric.

    Extended practice note 24

    Security: public accessibility checkbox

    The RDS console checkbox for public accessibility has caused endless incidents. Leave it false. If a reporting tool needs access, use VPN, bastion/SSM port forward patterns carefully, or a properly designed analytics export—not a public 5432. Combine with SG deny-by-default.

    Extended practice note 25

    Commerce matrix worked example sketch

    Cart: DynamoDB with TTL on abandoned carts or Redis with persistence caveats—prefer DynamoDB for durability of cart intent. Orders: RDS/Aurora transactional. Payment tokens: never store raw card data; use a payment provider; store references only. Inventory for physical goods: relational. Progress: relational or DynamoDB per access pattern. Session: ElastiCache or DynamoDB. Product images: S3. Product search: later OpenSearch lessons if needed—not OLTP misuse.

    Extended practice note 26

    Failure injection thinking

    Disable cache security group briefly in staging: does the API slow or fail hard? Reboot the RDS instance in a maintenance exercise: does the app retry? Delete a DynamoDB item category in a test table: does the UI handle missing? These drills teach more than reading FAQs.

    Extended practice note 27

    Cost drivers without fake prices

    RDS/Aurora: instance hours, storage, I/O patterns, backup storage, Multi-AZ duplication of compute. DynamoDB: reads/writes or on-demand request units, storage, optional features like PITR and global tables. ElastiCache: node hours and node sizes. Data transfer. The usual waste: oversized multi-AZ left from a load test; idle ElastiCache; DynamoDB provisioned high 24/7 for a Monday-only spike without autoscaling or on-demand. Lesson 11 frames budgets; delete labs now.

    Extended practice note 28

    IAM database authentication awareness

    Some engines support IAM auth for DB users, reducing password sprawl. It is not enabled by magic; applications must obtain tokens. Secrets Manager rotation is another path. Foundations: never bake static passwords into launch templates; prefer secrets injection patterns introduced later.

    Extended practice note 29

    Read replica lag story

    A Monday board pointed at a replica to “save the primary.” Replica lag hit seconds under write load from grading jobs. Instructors saw stale completion. Fix: critical board reads on primary or on a replica with lag monitoring and SLO, or precomputed aggregates updated transactionally. Replicas are not free consistency.

    Extended practice note 30

    Aurora endpoints

    Writer endpoint for writes; reader endpoint for read scaling. Applications that hardcode an instance endpoint fight failover. Use cluster endpoints as documented. Serverless scaling has cold start and scaling rate behaviors to validate for interactive APIs before committing the board.

    Foundations expansion 1

    TechLearningPro’s Monday reliability depends on the database answering after a cache miss, after an AZ failover, and after an ASG replacement. Design reconnects, timeouts, and health checks so a brief failover is a blip, not a blank board. Document the timeout values next to the Multi-AZ setting so on-call knows what learners experience.

    Foundations expansion 2

    A decision matrix that only lists services without rejected alternatives is incomplete. Write why progress does not live solely in ElastiCache, why order money does not live solely in DynamoDB if your joins need relational integrity, and why media does not live in the database BYTEA column. Rejected options teach more than selected logos.

    Foundations expansion 3

    Sandbox RDS instances should use the smallest class available, short backup retention, and immediate deletion after the exercise. If your organization forbids RDS in sandboxes, complete the matrix on paper and use DynamoDB on-demand for a put/get lab only. The learning objective is judgment under cost constraints, not maximizing managed feature checkboxes.

    Foundations expansion 4

    Connection storms happen when every new EC2 instance opens dozens of connections during a scale-out event while old connections linger. Set application pool sizes as a function of ASG max and the engine’s max_connections, leaving headroom for admin sessions. RDS Proxy awareness belongs in the matrix as a future control when connection count becomes the limiter.

    Foundations expansion 5

    Certificate eligibility must survive cache flushes, Redis upgrades, and node replacements. Store eligibility in the system of record, emit an event, and let the cache hold a derived view with a safe TTL. If marketing needs instant certificate availability after completion, use explicit invalidation on write rather than a long TTL guess.

    Foundations expansion 6

    DynamoDB single-table design is optional advanced modeling. Foundations teams can start with clear tables per entity if that improves correctness, then consolidate when access patterns and scale demand it. Premature single-table design without access pattern analysis produces unreadable sort keys and still needs Module 5 operations skill.

    Foundations expansion 7

    Read replicas for reporting should not share the OLTP primary’s busiest hours without workload management. Prefer exporting aggregates to S3 or a warehouse for the Monday executive board if the query set is analytical. Lesson 11 will ask whether performance efficiency used the right resource class—warehouse versus OLTP is that question.

    Foundations expansion 8

    ElastiCache encryption in transit and at rest, AUTH/RBAC where supported, and private subnets are baseline. Treat cache credentials like database passwords. Rotation and secret storage patterns arrive with the secrets lesson; until then, do not paste tokens into chat or AMI user data.

    Foundations expansion 9

    Global tables and cross-Region Aurora features solve real multi-Region needs and introduce conflict and latency complexity. Foundations should state the product requirement first: do learners need active writes in two Regions, or is read-only catalog replication enough? Most TechLearningPro early stages need one Region done well.

    Foundations expansion 10

    When interviewing, say what you own with RDS: schema, queries, indexes, parameter choices, SG, capacity class, backup retention, and application failover behavior. Say what AWS owns: host replacement for managed failures, automated backup storage mechanics, Multi-AZ standby management per service behavior. Clear ownership prevents blame ping-pong during outages.

    Foundations expansion 11

    Pilot programs must include a promotion checklist: Multi-AZ, backup retention, monitoring, SG review, password rotation owner, and load test results. A pilot DNS name that becomes permanent without the checklist is how single-AZ staging becomes production. Write the checklist in the matrix deliverable.

    Foundations expansion 12

    For the commerce challenge, separate cardholder data from your database by using a payment provider’s tokenization. Your RDS table stores charge references and fulfillment state, not raw PAN. Storage encryption does not make your app a PCI scope escape hatch by itself; architecture choices do.

    Foundations expansion 13

    Observability minimum: freeable memory, CPU, connections, replica lag, cache hit rate, DynamoDB throttles. Alarm before Monday. Module 4 deepens CloudWatch; foundations at least names the signals that prove the store is sick before learners tweet.

    Foundations expansion 14

    Schema migrations need forward-only discipline and expand/contract patterns later in DevOps modules. For now, never run unreviewed DDL on production Friday afternoon, and always backup before large migrations in shared sandboxes.

    Foundations expansion 15

    If ElastiCache and RDS both go into the lab, create them after the matrix is written, spend at most an hour validating connectivity, then delete. The matrix is the primary deliverable; the console resources are optional proof.

    Foundations expansion 16

    Aurora PostgreSQL versus RDS PostgreSQL choices involve storage architecture, replica features, and cost models that change—consult current documentation and your account team for production. Foundations only requires you to know Aurora is an option in the same relational conversation, not that you must pick it for every workload.

    Foundations expansion 17

    TTL on DynamoDB items for sessions is excellent. TTL on certificate records is a defect. Label item types and apply TTL only where expiry is a business feature. Mistagged TTL is silent data loss.

    Foundations expansion 18

    Least privilege for DynamoDB means resource ARNs for specific tables and indexes, and actions limited to GetItem PutItem Query UpdateItem as needed—not dynamodb:*. Same spirit as S3 prefix scoping in lesson 9.

    Foundations expansion 19

    A brownout where cache miss storms overwhelm RDS can be worse than cache being down with a lower request rate. Load-test fail-open behavior. Add admission control at the API if needed. Reliability is a system property, not a checkbox on Multi-AZ alone.

    Foundations expansion 20

    Document the Module 5 handoff list explicitly: patching cadence, major version upgrades, blue/green cutovers, deep performance diagnosis, PITR drills, and chaos failover. Humility is part of foundations quality.

    Foundations expansion 21

    TechLearningPro’s Monday reliability depends on the database answering after a cache miss, after an AZ failover, and after an ASG replacement. Design reconnects, timeouts, and health checks so a brief failover is a blip, not a blank board. Document the timeout values next to the Multi-AZ setting so on-call knows what learners experience.

    Foundations expansion 22

    A decision matrix that only lists services without rejected alternatives is incomplete. Write why progress does not live solely in ElastiCache, why order money does not live solely in DynamoDB if your joins need relational integrity, and why media does not live in the database BYTEA column. Rejected options teach more than selected logos.

    Foundations expansion 23

    Sandbox RDS instances should use the smallest class available, short backup retention, and immediate deletion after the exercise. If your organization forbids RDS in sandboxes, complete the matrix on paper and use DynamoDB on-demand for a put/get lab only. The learning objective is judgment under cost constraints, not maximizing managed feature checkboxes.

    Foundations expansion 24

    Connection storms happen when every new EC2 instance opens dozens of connections during a scale-out event while old connections linger. Set application pool sizes as a function of ASG max and the engine’s max_connections, leaving headroom for admin sessions. RDS Proxy awareness belongs in the matrix as a future control when connection count becomes the limiter.

    Foundations expansion 25

    Certificate eligibility must survive cache flushes, Redis upgrades, and node replacements. Store eligibility in the system of record, emit an event, and let the cache hold a derived view with a safe TTL. If marketing needs instant certificate availability after completion, use explicit invalidation on write rather than a long TTL guess.

    Foundations expansion 26

    DynamoDB single-table design is optional advanced modeling. Foundations teams can start with clear tables per entity if that improves correctness, then consolidate when access patterns and scale demand it. Premature single-table design without access pattern analysis produces unreadable sort keys and still needs Module 5 operations skill.

    Foundations expansion 27

    Read replicas for reporting should not share the OLTP primary’s busiest hours without workload management. Prefer exporting aggregates to S3 or a warehouse for the Monday executive board if the query set is analytical. Lesson 11 will ask whether performance efficiency used the right resource class—warehouse versus OLTP is that question.

    Foundations expansion 28

    ElastiCache encryption in transit and at rest, AUTH/RBAC where supported, and private subnets are baseline. Treat cache credentials like database passwords. Rotation and secret storage patterns arrive with the secrets lesson; until then, do not paste tokens into chat or AMI user data.

    Foundations expansion 29

    Global tables and cross-Region Aurora features solve real multi-Region needs and introduce conflict and latency complexity. Foundations should state the product requirement first: do learners need active writes in two Regions, or is read-only catalog replication enough? Most TechLearningPro early stages need one Region done well.

    Foundations expansion 30

    When interviewing, say what you own with RDS: schema, queries, indexes, parameter choices, SG, capacity class, backup retention, and application failover behavior. Say what AWS owns: host replacement for managed failures, automated backup storage mechanics, Multi-AZ standby management per service behavior. Clear ownership prevents blame ping-pong during outages.

    Foundations expansion 31

    Pilot programs must include a promotion checklist: Multi-AZ, backup retention, monitoring, SG review, password rotation owner, and load test results. A pilot DNS name that becomes permanent without the checklist is how single-AZ staging becomes production. Write the checklist in the matrix deliverable.

    Foundations expansion 32

    For the commerce challenge, separate cardholder data from your database by using a payment provider’s tokenization. Your RDS table stores charge references and fulfillment state, not raw PAN. Storage encryption does not make your app a PCI scope escape hatch by itself; architecture choices do.

    Foundations expansion 33

    Observability minimum: freeable memory, CPU, connections, replica lag, cache hit rate, DynamoDB throttles. Alarm before Monday. Module 4 deepens CloudWatch; foundations at least names the signals that prove the store is sick before learners tweet.

    Lesson Summary

    Foundations databases put TechLearningPro’s structured state in managed stores with backups, private networking, and clear roles for RDS/Aurora, DynamoDB, and ElastiCache. Cache accelerates; it does not replace truth. Operations depth comes in Module 5; judgment starts now. Delete lab databases so hourly charges do not outlive the lesson.

    AWS Well-Architected Framework and Cost Basics ties reliability, security, and cost across the module’s choices.

    Further Reading

    Ready to mark this lesson complete?Track your journey across the entire course.