Sub topic 1
What RDS does for you and what it does not
Prerequisites
This chapter assumes you know basic relational database concepts (tables, SQL, connections). It also assumes you have an AWS account, can use IAM users or roles and the AWS CLI, and understand VPCs, subnets, and security groups at a basic level.
What "managed" means
Amazon RDS (Relational Database Service) runs a relational database engine on an EC2-like instance that AWS operates for you. You choose the engine, size, and settings. AWS handles the work around the database process. You get a network endpoint and connect with your usual client or driver, but you do not get operating system access.
This trade is the central idea of RDS. You give up some control, such as root access to the host and custom OS packages. In return, AWS takes over routine infrastructure chores.
What AWS handles
- Hardware and data center. AWS provisions, powers, and replaces the underlying servers.
- Operating system and engine patching. AWS patches the host OS. It applies engine minor-version updates during a maintenance window you choose, if you allow it.
- Automated backups. RDS takes daily snapshots and stores transaction logs, which enables point-in-time restore.
- Failure recovery. With Multi-AZ, RDS keeps a standby copy in another Availability Zone and fails over when needed.
- Provisioning and scaling actions. You can change instance class or storage with an API call instead of building a new server.
What stays with you
RDS follows the AWS shared responsibility model. AWS is responsible for security and operation of the cloud infrastructure. You are responsible for what you put in it and how you configure it.
- Network exposure. You decide the VPC, subnets, security group rules, and whether the instance is publicly accessible.
- Access control. You manage database users, passwords or IAM authentication, and IAM permissions for the RDS API.
- Schema and queries. RDS does not fix a missing index or a slow query. Design, indexing, and tuning are yours.
- Right-sizing. You pick the instance class and storage, and you pay for them whether or not they are busy.
- Backup and availability choices. Retention period, Multi-AZ, and read replicas are options you must turn on and test.
- Encryption choices. You enable encryption at rest when you create the instance, and you configure clients to use TLS.
- Upgrades on your schedule. Major engine version upgrades can break applications, so you plan and test them.
Responsibility at a glance
| Task | Self-managed database on EC2 | Amazon RDS |
|---|---|---|
| Rack, power, and hardware | AWS | AWS |
| OS patching | You | AWS |
| Engine installation and minor patches | You | AWS (in your maintenance window) |
| Backups and log archiving | You | AWS, configured by you |
| Failover automation | You | AWS, if Multi-AZ is enabled |
| OS shell access | You | Not available |
| Schema, indexes, query tuning | You | You |
| Network rules and user access | You | You |
How the layers divide
A quick look at the boundary
You can see the boundary directly in the CLI. This command lists instances and shows settings that you control, such as public accessibility, Multi-AZ, and backup retention.
aws rds describe-db-instances \
--query "DBInstances[].{Id:DBInstanceIdentifier,Public:PubliclyAccessible,MultiAZ:MultiAZ,Backups:BackupRetentionPeriod,Encrypted:StorageEncrypted}" \
--output tableEach column is a decision that belongs to you. If Public is True, MultiAZ is False, or Backups is 0, RDS is running exactly as configured, not as you may have assumed.
Common mistakes
- Assuming "managed" means "no operations work." You still monitor, tune, and plan upgrades.
- Expecting SSH access to the host. RDS does not offer it.
- Treating backups as untested. A backup you have never restored is unproven.
Exercise
A teammate says, "RDS is managed, so a slow query on our instance is AWS's problem to fix." Is that correct? Name who is responsible and one thing that AWS does handle.
Show answer
No. Query design, indexing, and tuning are the customer's responsibility under the shared responsibility model. AWS handles things like hardware, OS patching, and automated backups.
Exercise
You run the describe-db-instances command and see Backups = 0 and MultiAZ = False for a production instance. What does this mean for recovery?
Show answer
Automated backups are disabled, so point-in-time restore is not available. With no standby in another Availability Zone, a failure of the instance or its zone means downtime and possible data loss. Both settings are the customer's to enable.