Easy ReviewDOP-C02
SDLC Automation71

RDS

Choose RDS failover, read replicas, recovery, storage growth, safe database updates, and connection pooling.

Este conteúdo de estudo ainda não foi traduzido, então aparece em inglês. Ajude a traduzir

RDS availability, read scaling, backup recovery, and database updates use different mechanisms. These sections explain which copy serves reads, which copy can become a writer, and when recovery needs a new DB instance.

Multi-AZ and failover tests

Multi-AZ keeps database copies in separate Availability Zones (AZs), which are isolated locations within an AWS Region. It lets RDS move database service to another AZAn isolated location within an AWS Region used to separate database copies from a local failure. after an infrastructure failure. The RDS deployment models differ in whether their standby copies can serve reads.

How it works

  1. For a Multi-AZ DB instance, RDS maintains a synchronous standby: changes are copied as part of committing writes. The standby is in another AZ and does not accept application reads.
  2. A Multi-AZ DB cluster supports MySQL or PostgreSQL and has a writer and two readable replicas across three AZs. It uses semisynchronous replicationA replica acknowledges receiving a change before all replicas have applied it., where a replica acknowledges receipt before all replicas have applied the change.
  3. If a Multi-AZ DB instance suffers a qualifying outage, RDS promotes the standby and updates the database endpointA network name that clients use to connect to a database or proxy.’s DNSThe naming system that resolves a database endpoint name to its network address. record. DNS maps the endpoint name to an address. Clients must resolve the endpoint and reconnect.
  4. To add availability to an existing Single-AZ instance, modify it to enable Multi-AZ. RDS initializes standby storage from a snapshotA stored backup of the database instance storage at a particular time. and enables synchronous replicationChanges are copied to a standby as part of committing writes on the primary.. Allow for write-performance impact.
  5. Choose a DB subnet group to define the eligible VPC subnets for placement. RDS selects a subnet and an IP address from the group.
  6. For a Multi-AZ DB cluster, connect writes to the cluster writer endpoint and read-only work to the reader endpoint. These endpoints handle failoverDatabase service moves from a failed primary or writer to a standby or reader. better than an endpoint tied to one DB instance.

Exam cues

  • If the question says automatic recovery from an AZ failure, think Multi-AZ, because RDS manages a copy in another AZ and the failover.
  • If the question says reporting reads from a standby, think a Multi-AZ DB cluster or read replica, because the single standby of a Multi-AZ DB instance does not serve reads.
  • If the question says Java clients cannot reconnect after failover, think DNS cache settings, because an old cached address can hide the endpoint change.

Remember

  • Multi-AZ DB instance: one standby. Multi-AZ DB cluster: two readable replicas across three AZs.
  • DB instance failover typically takes 60 to 120 seconds; large transactions can extend it.
  • AWS recommends a Java DNS cache time-to-liveThe duration for which a cached DNS answer can be kept before it is looked up again. of no more than 60 seconds.
  • RDS for Oracle does not support Oracle Real Application Clusters (RAC). Use Multi-AZ for managed availability.

Trap: A readable replica and a single Multi-AZ standby have different roles. The single standby provides failover without serving application reads.

Multi-AZ DB instance connection and replication paths
SQL1synchronous2Applicationconnect by endpointPrimaryAZ A: reads and writesStandbyAZ B: no client reads
  1. The application connects to the primary through its database endpoint.

  2. RDS copies changes synchronously to the standby; after failover, the endpoint points to this standby and clients reconnect.

Da documentação da AWS (17)
  • A Multi-AZ DB instance synchronously copies changes to a standby in another Availability Zone.
  • The standby of a Multi-AZ DB instance cannot serve application reads.
  • A Multi-AZ DB cluster has a writer and two readable replicas in three Availability Zones in one Region.
  • A Multi-AZ DB cluster uses semisynchronous replication.
  • RDS automatically fails over a Multi-AZ DB instance to its standby after qualifying infrastructure outages.
  • Multi-AZ DB instance failover changes the endpoint DNS record to the standby and requires clients to re-establish connections.
  • Multi-AZ DB instance failover typically takes 60 to 120 seconds and can take longer with large transactions or recovery.
  • AWS recommends a Java DNS cache time-to-live no greater than 60 seconds for RDS failover.
  • An existing Single-AZ DB instance can be modified to Multi-AZ by adding a standby in another Availability Zone.
  • Single-AZ to Multi-AZ conversion creates standby volumes from a snapshot and enables synchronous replication; write performance can be affected.
  • Amazon RDS for Oracle does not support Oracle Real Application Clusters (RAC); AWS directs high-availability workloads to Multi-AZ.
  • An RDS DB instance needs a VPC with subnets in at least two Availability Zones, even for Single-AZ, so a standby can be created later.
  • Multi-AZ DB cluster failover typically completes in under 35 seconds, once both readers have applied the outstanding transactions of the failed writer.
  • An RDS DB subnet group lists eligible VPC subnets; RDS selects a subnet and an IP address from that group when placing a DB instance.
  • An RDS Multi-AZ DB cluster instance endpoint addresses one DB instance; writer and reader endpoints are better suited to connections that must follow failover.
  • The database engines available for an RDS Multi-AZ DB cluster are MySQL and PostgreSQL.
  • For an RDS Multi-AZ DB cluster, the cluster endpoint connects to the writer for reads and writes, while the reader endpoint sends read-only connections to reader instances.

Read replicas and Regional recovery

A read replica is a database copy used to move read queries away from an RDS source. Supported replicas can also provide a recovery copy in another Region. The RDS read-replica guide explains that replication is asynchronous: the source can commit a write before the replica receives it.

How it works

  1. Enable backup retention on the source, then create a supported read replica. RDS initializes the copy and uses the engine’s replication mechanism to send changes.
  2. Send reporting or other supported read workloads to the replica. Watch ReplicaLag, the delay in seconds behind the source; recent writes might not yet be visible.
  3. For Regional recovery, create the replica in another Region before an outage. A supported replica can also have its own Multi-AZ standby, independent of the source’s configuration.
  4. When recovery requires a new writable database, promote the replica. RDS reboots it and ends replication from the old source. Redirect the application and create a replacement replica.
  5. For a MySQL replica stopped by a packet size error, match max_allowed_packet in the source and replica parameter groups.

Exam cues

  • If the question says reporting queries overload the source, think read replicas, because they move read work to separate database instances.
  • If the question says recover in another Region with a running database copy, think cross-Region read replica promotionA read replica becomes a standalone database and stops replicating from its original source., because the replica can become standalone. Account for recent writes that have not replicated.
  • If the question says the reporting replica also needs AZAn isolated location within an AWS Region used to separate database copies from a local failure. failoverDatabase service moves from a failed primary or writer to a standby or reader., think Multi-AZ for that replica, because it can have its own standby.
  • If RDS for MySQL replication stops on a packet size error, compare max_allowed_packet on source and replica.

Remember

  • Add and remove RDS DB instance read replicas manually; their count does not autoscale with read demand.
  • Promotion can take several minutes or longer and stops replication from the source.
  • Same-Region replication transfer is free. Cross-Region initial snapshotA stored backup of the database instance storage at a particular time. transfer and ongoing change transfer are billed.
  • Replica instances have their own standard DB instance charges.

Trap: A cross-Region read replica is not a guarantee that every committed write survives a source outage. Asynchronous replicationA source can commit a database change before a replica receives and applies it. can leave the recovery copy behind.

Cross-Region replica before and after promotion
12Source databaseRegion ARead replicaRegion B: before recoveryStandalone DBRegion B: after promotion
  1. Changes flow from the source to the cross-Region replica and can lag.

  2. Promotion reboots the replica and ends source replication; redirect application traffic to the standalone database.

Da documentação da AWS (13)
  • RDS read replicas use asynchronous engine replication to offload supported read workloads from the source.
  • Asynchronous RDS replication can return stale data; ReplicaLag measures delay behind the source in seconds for supported engines.
  • RDS DB instance read replicas must be created and removed manually rather than automatically scaled with read demand.
  • The source of an RDS read replica must have backup retention enabled.
  • Supported RDS DB instance read replicas can reside in a different Region from the source.
  • Promoting an RDS read replica makes it a standalone DB instance and stops its replication relationship with the source.
  • For recovery using a read replica, promote it, redirect database traffic to it, and create a replacement replica.
  • Read replica promotion reboots the instance and can take several minutes or longer.
  • A supported RDS read replica can have its own Multi-AZ standby regardless of the source deployment type.
  • RDS does not charge for replication data transfer to a read replica within the same Region.
  • Cross-Region read replica transfer charges apply to the initial snapshot and ongoing changes leaving the source Region.
  • RDS read replicas are billed as standard DB instances for their instance class.
  • RDS for MySQL replication can stop if the replica's max_allowed_packet is smaller than the source's; use matching values in their parameter groups to resolve this error.

Backups and point-in-time recovery

RDS backups provide earlier copies of a database for recovery after a data error. Point-in-time recoveryRestoration creates a new database instance at an available time within the backup retention window. (PITR) combines backups and transaction logsA record of database changes used with backups for point-in-time recovery., which record database changes, to recover to an available time within the retention window. The backup guide describes backups of the whole DB instance.

How it works

  1. Set automated backup retention. A value of 0 disables automated backups for a DB instance; changing between 0 and a nonzero value causes an outage.
  2. RDS stores automated backups and manual DB snapshotsA stored backup of the database instance storage at a particular time. in Amazon S3, and uploads transaction logs every five minutes. Check LatestRestorableTime before selecting a recovery point.
  3. Use PITR to restore to an available time before the error. RDS creates a new DB instance and leaves the source unchanged.
  4. Preserve a manual or final snapshot when deleting an instance if you need a lasting recovery copy. Automated backups require an explicit retain choice to survive deletion for their retention period.
  5. For supported DB instances, cross-Region automated backup replication copies snapshots and transaction logs to a destination Region. Multi-AZ DB clusters do not support this feature.
  6. A snapshot restore can be available before all data has loaded from Amazon S3. Include this background loading and its effect on queries when assessing recovery readiness.

Exam cues

  • If the question says an accidental deletion has reached the Multi-AZ standby, think PITR before the deletion, because synchronous replicationChanges are copied to a standby as part of committing writes on the primary. also copies unwanted changes.
  • If the question says recover a deleted DB instance after its automated backups are gone, think a retained manual or final snapshot, because those copies are independent of instance deletion.
  • If the question says restore without overwriting the source, think PITR, because it creates another DB instance.

Remember

  • DB instance retention: 0 to 35 days. Multi-AZ DB cluster retention: 1 to 35 days.
  • New DB instance defaults: one day through API/CLI, seven days through the console.
  • Transaction log upload interval: five minutes. Use the actual LatestRestorableTime for recovery.
  • Automated backups and manual DB snapshots cover DB instance storage, rather than a selected table or database.

Trap: Multi-AZ availability does not supply an earlier database state. A committed mistake is copied to the standby; restore a backup from before the mistake.

Da documentação da AWS (20)
  • RDS backups and manual DB snapshots cover the DB instance storage, rather than only a selected database.
  • RDS point-in-time recovery restores a DB instance to an available time within its backup retention period.
  • RDS point-in-time recovery creates a new DB instance without changing the source.
  • RDS uploads DB instance transaction logs to Amazon S3 every five minutes.
  • LatestRestorableTime reports the latest available recovery time for an RDS DB instance.
  • An RDS DB instance backup retention period can be 0 to 35 days; 0 disables automated backups.
  • For a newly created RDS DB instance, backup retention defaults to one day through the API or CLI and seven days through the console.
  • A Multi-AZ DB cluster backup retention period can be 1 to 35 days.
  • Changing RDS DB instance backup retention between 0 and a nonzero value causes an outage.
  • Manual and final RDS snapshots survive deletion of the DB instance independently of automated backups.
  • Deleting an RDS DB instance deletes automated backups unless the user chooses to retain them for the retention period.
  • Supported RDS DB instances can replicate snapshots and transaction logs to another Region; this automated backup replication is not supported for Multi-AZ DB clusters.
  • RDS Multi-AZ DB instance replication copies database changes synchronously to the standby.
  • RDS includes free backup storage up to 100 percent of the total provisioned database storage in the account for each Region, covering DB snapshots and DB cluster snapshots.
  • Aurora automated backups cannot be turned off; the cluster keeps continuous, incremental backups for its retention period (1 day by default).
  • RDS for MySQL can create a new DB instance from backup files that you upload to Amazon S3.
  • The first snapshot of a DB instance holds the full database; later snapshots of it store only the data changed since the most recent snapshot.
  • Final and manual DB snapshots are kept after the DB instance is deleted, independent of the backup retention period; automated backups are deleted with the instance unless you choose to retain them.
  • An RDS snapshot restore can become available while data still loads in the background; accessing data not yet loaded downloads it from Amazon S3.
  • Automated RDS backups and manually created DB snapshots use Amazon S3 for backup storage.

Storage autoscaling and metrics

RDS storage autoscaling grows a DB instance’s allocated disk space when free space stays low. It addresses storage capacity up to a configured ceiling. CloudWatch metrics separately show disk queues, operation times, CPU use, and connections.

How it works

  1. Enable autoscaling and set a maximum storage threshold. It must be at least 10 percent above current allocation; AWS recommends 26 percent or more. Changing this setting does not require downtime.
  2. Monitor the remaining space and I/ODisk read and write operations performed for a database., meaning disk reads and writes. A large load can still fill storage before another modification is permitted. Autoscaling never shrinks allocated storage.
  3. Use Enhanced Monitoring to see real-time CPU and memory use by database and operating system processes. Use CloudWatch Database Insights to examine database load by waits, SQL statements, hosts, or users.
  4. For a database that requires predictable I/O performance and consistently low latency, choose Provisioned IOPSThe number of disk read or write operations completed each second. SSD storage. Storage autoscaling addresses capacity growth separately.

Exam cues

  • If the question says unpredictable disk growth, think storage autoscaling with a suitable maximum, because RDS can increase allocation when its low-space conditions are met.
  • If the question says rising disk queues and slow queries, think queue, latency, IOPS, and throughputThe number of bytes read from or written to disk per second. metrics together, because they describe different parts of disk activity. IOPS means operations per second; throughput means bytes transferred per second.
  • If the question says CPU and memory use by process, think Enhanced Monitoring, because its process list reports both.
  • If the question says identify SQL statements behind database load, think CloudWatch Database Insights, because it can filter load by SQL statement.

Remember

Metric Meaning
DiskQueueDepth Read/write requests waiting for disk access
ReadLatency, WriteLatency Average seconds per disk operation
ReadIOPS, WriteIOPS Disk operations per second
ReadThroughput, WriteThroughput Bytes read or written per second
FreeStorageSpace Available storage in bytes
CPUUtilization CPU use as a percentage
DatabaseConnections Client network connections, excluding some internal sessions
ReplicaLag Supported replica delay in seconds

Trap: Storage autoscaling cannot guarantee that a large import avoids a full disk. Storage can fill before another modification is permitted, and growth stops at the configured ceiling.

Da documentação da AWS (17)
  • RDS storage autoscaling automatically increases allocated storage up to a configured maximum threshold.
  • The RDS autoscaling maximum threshold must be at least 10 percent above current allocated storage; AWS recommends at least 26 percent above it.
  • Storage autoscaling cannot reduce RDS allocated storage.
  • Large data loads can fill RDS storage before another autoscaling modification is permitted.
  • Enabling or changing RDS storage autoscaling settings does not require a reboot or downtime.
  • DiskQueueDepth counts outstanding disk read and write requests waiting for access.
  • ReadLatency and WriteLatency measure average time per disk I/O operation in seconds.
  • ReadIOPS and WriteIOPS measure disk operations per second; ReadThroughput and WriteThroughput measure bytes per second.
  • FreeStorageSpace measures available RDS storage in bytes.
  • DatabaseConnections counts client network connections; it does not include every internal database session.
  • CPUUtilization measures the percentage of CPU used by the DB instance.
  • ReplicaLag measures supported RDS read replica delay in seconds.
  • RDS DB instance read replicas do not automatically scale their count with read demand.
  • Enhanced Monitoring reads operating system metrics in real time from an agent on the DB instance, while standard CloudWatch metrics come from the hypervisor, and delivers them to CloudWatch Logs (log group RDSOSMetrics, 30 days by default).
  • The Enhanced Monitoring process list shows RDS child processes (such as mysqld), RDS processes and OS processes, with the memory and CPU each one uses.
  • CloudWatch Database Insights, which builds on Performance Insights, shows database load and filters it by waits, SQL statements, hosts or users, so you can find the queries that load the database.
  • Amazon RDS Provisioned IOPS SSD storage suits databases that need consistently low I/O latency and predictable I/O performance.

Blue/green deployments

RDS Blue/Green Deployments prepares database changes in a separate staging copy while production continues running. Blue means current production; green means the synchronized staging environment. The RDS overview describes this workflow for supported MariaDB, MySQL, and PostgreSQL versions and Regions.

How it works

  1. Create the blue/green deployment. RDS copies the production environment and keeps green synchronized.
  2. Apply and test supported engine, parameter, or file system changes in green. Before switching, reduce replication lag, the delay in copying changes, and finish long-running writes and schema operations.
  3. Request switchoverA planned transfer of the production role from the blue database environment to green., the managed transfer of the production role. RDS runs guardrailsA readiness check that can stop an unsafe database switchover., which are readiness checks, before stopping new writes and database connections.
  4. RDS waits for replication to catch up, renames database instances and endpointsA network name that clients use to connect to a database or proxy., then allows connections and writes on the new production database. The production endpoint names are preserved.
  5. After success, old blue remains billable and replication between the environments stops. If blue/green cannot be used for a MySQL upgrade, AWS documents a manual sequence: upgrade a read replica, confirm it is caught up, pause source writes, promote it, and redirect writes.
  6. If using RDS Proxy, clients must reconnect after green becomes the writer. Switchover also replaces green resource tags with blue resource tags.

Exam cues

  • If the question says test a supported RDS upgrade while keeping production running, think Blue/Green Deployments, because green is a staging copy kept in sync with blue.
  • If the question says long transactions or replica lagThe delay between a database change on the source and its arrival or application on a replica. threaten switchover, think readiness guardrails, because RDS checks that the environments can switch within the timeout.
  • If the question says manually promote green, think use switchover, because promotionA read replica becomes a standalone database and stops replicating from its original source. breaks the managed deployment’s replication relationship.
  • If the question says an application uses RDS Proxy during switchover, plan for reconnections because existing proxy connections are dropped.

Remember

  • Switchover usually takes under a minute, depending on workload; that is not a maximum-time guarantee.
  • Timeout: 30 to 3600 seconds. Default: 300 seconds.
  • Exceeding the timeout rolls back switchover changes without changing either environment.
  • Old blue remains billable after success and no longer receives replication from the new production database.

Trap: A failed switchover rollback and returning to old blue after a successful switchover are different events. After success, old blue is no longer synchronized.

Prepare green, then switch production
12Bluecurrent productionGreenreplicate and testNew productiongreen takes blue endpoint
  1. RDS creates green from blue and keeps it synchronized while supported changes are tested.

  2. After guardrails pass, RDS blocks writes and connections, catches up replication, renames endpoints, and opens new production.

Da documentação da AWS (14)
  • RDS Blue/Green Deployments creates a synchronized staging copy, called green, of the production environment, called blue.
  • Supported RDS engine versions, database parameters, and file system changes can be tested in green before switchover.
  • RDS Blue/Green Deployments supports MariaDB, MySQL, and PostgreSQL, subject to Region and version availability.
  • RDS blue/green switchover typically takes under a minute, depending on workload, without data loss.
  • RDS blue/green switchover timeout ranges from 30 to 3600 seconds and defaults to 300 seconds.
  • If RDS blue/green switchover exceeds its timeout, its changes are rolled back and neither environment is changed.
  • RDS blue/green guardrails check replication health and lag, active green writes, and long-running blue writes and schema operations.
  • RDS blue/green switchover checks readiness, stops new writes and connections, waits for replication, renames instances and endpoints, then enables connections and new-production writes.
  • RDS renames green endpoints to their corresponding production endpoints so applications need no endpoint change after switchover.
  • Manually promoting green breaks replication and puts the blue/green deployment in Invalid configuration.
  • After a successful RDS blue/green switchover, old blue DB instances remain billable and replication between the environments stops.
  • When RDS MySQL blue/green cannot be used, AWS documents upgrading a read replica, confirming it is caught up, suspending source writes, promoting the replica, and redirecting writes to it.
  • During RDS blue/green switchover, RDS Proxy routes to blue until it detects the switch; existing proxy connections are dropped when green becomes the writer and clients must reconnect.
  • During RDS blue/green switchover, tags from blue replace tags on green resources.

RDS Proxy connection pooling

RDS Proxy reduces connection pressure by keeping a shared pool of database connections. A connection poolA set of open database connections shared and reused across client requests. is a set of open connections that clients can reuse. The RDS Proxy guide describes reuse, authentication, and recovery through a standby after database failure.

How it works

  1. Point application clients at the proxy endpointA network name that clients use to connect to a database or proxy., the connection address for the proxy. Client connections end there; RDS Proxy manages separate connections to the database.
  2. The proxy shares backend connections among client requests. It can enforce IAM authentication, which uses AWS identities, and connect to the database using IAM authentication or credentials from Secrets Manager.
  3. Under overload, the proxy can queue or throttle requests and reject client connections when configured limits are exceeded.
  4. Watch for session pinningA client session keeps one backend database connection until that session ends., where a client keeps one backend connection until its session ends. This reduces sharing. For repeated reads that tolerate stale results, ElastiCache query caching can reduce database work: a miss queries the database and stores the result.
  5. Check engine and version eligibility: RDS Proxy supports RDS MariaDB, MySQL, PostgreSQL and SQL Server, and Aurora MySQL and PostgreSQL. AWS manages and scales the proxy capacity.
  6. Require TLS/SSL in the client connection settings to encrypt the connection to the proxy. The client-to-proxy TLS version can differ from the version used with the database.

Exam cues

  • If the question says bursts of short Lambda invocations exhaust RDS connections, think RDS Proxy, because it reuses connections across client requests.
  • If the question says repeated read queries consume database CPU, think query caching when stale results are acceptable, because a cache hit avoids another database query.

Remember

  • Session pinning ties one backend connection to a client session until it ends.
  • The proxy can queue or throttle requests and reject connections when configured limits are exceeded.

Trap: A proxy shares connections but still has capacity limits. It can reject demand, and pinning can reduce reuse. Query caching also needs a consistency decision: avoid it for reads that must always reflect the latest write.

Client connections and shared database connections
connect1reuse pool2Applicationmany short connectionsRDS Proxyshared backend poolDatabasebounded connections
  1. Application connections terminate at the proxy endpoint.

  2. The proxy shares database connections up to its configured limit; session pinning reduces sharing.

Da documentação da AWS (12)
  • RDS Proxy shares and reuses database connections to reduce the overhead of opening connections for each client request.
  • RDS Proxy can enforce IAM authentication for clients and use IAM database authentication or Secrets Manager credentials for database connections.
  • RDS Proxy can connect to a standby during database failure while preserving application connections.
  • Clients connect to RDS Proxy, while the proxy manages separate database connections.
  • RDS Proxy session pinning reserves one underlying database connection for a client session until that session ends, reducing reuse.
  • RDS Proxy can queue or throttle requests and reject client connections when configured limits are exceeded.
  • Caching repeated relational query results in ElastiCache reduces repeated database reads; a cache miss queries the database and stores the result.
  • Query caching is unsuitable when queries require strong consistency or read-after-write consistency inside multi-statement transactions.
  • A proxy default endpoint is provisioned across two Availability Zones chosen from its subnets; up to 20 additional endpoints can be added per proxy.
  • RDS Proxy supports eligible versions of RDS for MariaDB, MySQL, PostgreSQL and SQL Server, plus Aurora MySQL and Aurora PostgreSQL.
  • RDS Proxy is fully managed and automatically scales its capacity with application demand.
  • Clients can require TLS/SSL when connecting to an RDS Proxy endpoint; the proxy can accept a newer TLS version than its underlying database.

Encryption, authentication and maintenance

RDS security includes encryption at rest and SSL/TLS encryption for connections. Maintenance behavior on Multi-AZ is another common exam topic.

How it works

  1. Choose encryption and a KMS key when creating the instance.
  2. To fix an unencrypted instance: snapshotA stored backup of the database instance storage at a particular time., encrypted copy, restore (or blue/green).
  3. To share an encrypted snapshot: it must use a customer managed key shared with the target account.
  4. Clients use SSL/TLS to encrypt connections in transit.
Maintenance on Multi-AZ Effect
Operating system update Standby first, then failoverDatabase service moves from a failed primary or writer to a standby or reader., then old primary: short interruption
Database engine upgrade Primary and standby together: downtime until done

Exam cues

  • If the question says encrypt an existing unencrypted RDS database, think encrypted snapshot copy and restore.
  • If the question says share an encrypted snapshot across accounts, think a customer managed key.
  • If the question says encrypt connections to an RDS database, think SSL/TLS.

Remember

  • Encryption at rest is set at creation; the KMS key can’t change later.
  • Default-key snapshots can’t be shared; encrypted snapshots can’t be public.

Trap: Multi-AZ protects against OS patching and instance failure, not engine upgrades. An engine version upgrade still causes downtime.

Da documentação da AWS (15)
  • Amazon RDS encrypts DB instances at rest with an AWS KMS key, either the AWS managed key for RDS (the default) or a customer managed key you choose when creating the instance.
  • To encrypt an unencrypted RDS DB instance or change its KMS key, copy a manual snapshot with encryption enabled and restore it, or use a blue/green deployment with an encrypted green environment.
  • Once an encrypted RDS DB instance exists, you can't change the KMS key it uses.
  • An RDS snapshot encrypted with the account's default AWS managed key can't be shared; copy it with a customer managed key, share that copy, and give the target account access to the key.
  • Encrypted RDS snapshots can't be shared publicly.
  • SSL/TLS connections encrypt data moving between a client and an RDS DB instance and can verify the server's identity with its certificate.
  • In a Multi-AZ deployment, RDS applies operating system updates to the standby first, promotes it to primary, then updates the old primary, which becomes the new standby.
  • A database engine upgrade on a Multi-AZ RDS instance modifies the primary and standby at the same time, so the database is unavailable until the upgrade finishes.
  • To require encrypted connections, set rds.force_ssl to 1 for RDS for SQL Server (a static parameter, so reboot) or require_secure_transport to ON for RDS for MySQL (no reboot needed) in the DB parameter group.
  • A read replica has the same encryption state as its source: an unencrypted instance cannot have an encrypted replica, and an encrypted one cannot have an unencrypted replica.
  • RDS can publish database logs, such as the MySQL audit, error, general and slow query logs, to CloudWatch Logs, where they are kept until a retention period is set.
  • RDS major version upgrades are always started manually; minor version upgrades can be applied manually or automatically by turning on Auto minor version upgrade.
  • RDS for Oracle and RDS for SQL Server also support Transparent Data Encryption (TDE), an engine feature with its own keys that can run alongside RDS encryption at rest.
  • KMS keys belong to one Region, so copying an encrypted DB snapshot or creating an encrypted read replica in another Region requires a KMS key in the destination Region.
  • RDS encryption at rest covers the DB instance storage plus its logs, automated backups, read replicas and snapshots.

RDS operational troubleshooting

RDS operational troubleshooting connects backup timing, failoverDatabase service moves from a failed primary or writer to a standby or reader. tests, connection capacity, storage growth, and monitoring to the conditions that control them.

How it works

  1. Check automated backup conditions: the instance must be available, and a same-Region snapshotA stored backup of the database instance storage at a particular time. copy for that database must not be running. For AWS Backup, schedule jobs outside the RDS backup window unless AWS Backup manages both snapshots and continuous backups.
  2. For an RDS for Oracle cross-Region snapshot copy, set CopyOptionGroup to true to copy the option groupA collection of database engine features and settings associated with an RDS DB instance. in the same request. This capability was added in November 2026.
  3. To test a Multi-AZ DB instance, stop transactions and reboot with failover, which switches to the standby. For a Multi-AZ DB cluster, use manual failover with FailoverDBCluster or failover-db-cluster.
  4. Set MaxConnectionsPercent to limit proxy connections to the database relative to max_connections. Compare DatabaseConnections with MaxDatabaseConnectionsAllowed: reserved connections can reduce the usable limit. ConnectionBorrowTimeout controls the wait for a database connection; IdleClientTimeout closes idle clients and returns their database connections to the pool.
  5. Storage autoscaling starts a modification only after free space remains at or below 10 percent for at least five minutes, prior storage optimization finishes, and fewer than four storage modifications have occurred in the past 24 hours. It chooses the greatest of 10 GiB, 10 percent of allocated storage, or predicted growth exceeding allocation over the next seven hours, based on the past hour of FreeStorageSpace.
  6. Compare CPU measurements with their source in mind. Standard CloudWatch metrics come from the hypervisor, while Enhanced Monitoring uses an agent on the DB instance and sends operating system metrics to CloudWatch Logs.

Exam cues

  • If the question says an automated backup was missed while an instance was storage_full, think instance availability, because automated backups require the available state.
  • If the question says AWS Backup jobs fail during the RDS backup window, think backup scheduling or AWS Backup managing both backup types, because the window can cause a conflict.
  • If the question says test failover, think reboot with failover for a DB instance and manual cluster failover for a DB cluster, because they use different operations.
  • If the question says reserve database connections for other users, think MaxConnectionsPercent and the proxy capacity metrics, because the configured percentage and usable limit can differ.
  • If the question says storage remains low despite autoscaling, think the low-space duration and previous modifications, because all trigger conditions must be met.
  • If the question says CPU readings differ, think the hypervisor and instance agent, because they collect metrics from different places.

Remember

  • Proxy connection borrow timeout: 120 seconds by default. Idle client timeout: 1800 seconds by default.
  • Storage trigger: free space at or below 10 percent for at least five minutes, completed optimization, and fewer than four modifications in 24 hours.
  • Storage increment: the greatest of 10 GiB, 10 percent of allocation, or the seven-hour predicted growth exceeding allocation.
  • Enhanced Monitoring writes to the RDSOSMetrics log group, with 30 days of retention by default.

Trap: A configured proxy connection percentage does not directly give the usable connection count. Reserved connections can make MaxDatabaseConnectionsAllowed lower.

Da documentação da AWS (13)
  • RDS automated backups do not occur unless the DB instance is available, or while a snapshot copy for that database runs in the same Region.
  • Unless AWS Backup manages both RDS snapshots and continuous backups, its RDS backup jobs fail when initiated during the RDS automated backup window.
  • Since November 2026, RDS for Oracle can copy the snapshot's option group to another Region in the same snapshot copy request using CopyOptionGroup.
  • Reboot with failover tests a Multi-AZ DB instance by switching to its standby; AWS recommends stopping transactions before this abrupt interruption.
  • A Multi-AZ DB cluster supports a manual failover through FailoverDBCluster or failover-db-cluster.
  • MaxConnectionsPercent limits RDS Proxy backend connections as a percentage of the database max_connections setting.
  • RDS Proxy DatabaseConnections and MaxDatabaseConnectionsAllowed show used and permitted backend connections; reserved connections can make the latter lower than the configured percentage suggests.
  • ConnectionBorrowTimeout defaults to 120 seconds and limits how long RDS Proxy waits for an available database connection.
  • IdleClientTimeout defaults to 1800 seconds; closing an idle client connection returns its backend connection to the pool.
  • RDS storage autoscaling requires free space at or below 10 percent of allocated storage for at least five minutes.
  • RDS storage autoscaling requires prior storage optimization to finish and fewer than four storage modifications in the past 24 hours.
  • RDS autoscaling adds the greatest of 10 GiB, 10 percent of allocated storage, or predicted growth exceeding allocated storage over the next seven hours based on the past hour of FreeStorageSpace.
  • Enhanced Monitoring reads operating system metrics in real time from an agent on the DB instance, while standard CloudWatch metrics come from the hypervisor, and delivers them to CloudWatch Logs (log group RDSOSMetrics, 30 days by default).

Flashcards

toque para virar
Resposta

·

Todos os 71 flashcards em lista

An RDS application needs automatic recovery if its database Availability Zone fails. Which deployment should the team choose?

A Multi-AZ DB instance. RDS maintains a synchronous standby in another Availability Zone and automatically fails over after qualifying outages.

Can the standby of an RDS Multi-AZ DB instance serve reporting queries?

No. Use a read replica or a Multi-AZ DB cluster with readable replicas. The single standby is reserved for failover.

An RDS Multi-AZ DB instance has failed over, but the application still uses an old connection. What must the application do?

Resolve the database endpoint again and reconnect. RDS updates its DNS record, but existing connections must be re-established.

Must a team recreate an existing Single-AZ RDS DB instance to obtain a Multi-AZ standby?

No. Modify the existing instance to enable Multi-AZ. Plan for possible write-performance impact while the standby is initialized.

An RDS for Oracle migration requires Oracle RAC for availability. Is that feature supported?

No. RDS for Oracle does not support Oracle RAC. Use RDS Multi-AZ for the managed standby and failover requirement.

An RDS for PostgreSQL workload needs faster failover than the 60 to 120 seconds of a Multi-AZ DB instance, plus readable standbys. Which RDS deployment fits?

A Multi-AZ DB cluster: a writer and two readable replicas in three AZs. Failover is typically under 35 seconds.

When creating an Amazon RDS DB instance in a VPC, what controls which subnets RDS can choose for placement?

The DB subnet group. It lists eligible VPC subnets from which RDS selects a subnet and IP address.

An Amazon RDS Multi-AZ DB cluster application uses an individual instance endpoint for writes. Which endpoint better supports reconnecting after writer failover?

The cluster writer endpoint. It tracks the current writer; an instance endpoint identifies a particular DB instance.

A team choosing Amazon RDS needs a Multi-AZ DB cluster with readable replicas. Which database engines can it select?

MySQL or PostgreSQL. RDS Multi-AZ DB clusters support these two engines.

An Amazon RDS Multi-AZ DB cluster serves order updates and read-only reports. Which endpoints should the application use?

The cluster writer endpoint for updates and the reader endpoint for reports. The reader endpoint creates read-only connections to reader instances.

How do RDS DB instance read replicas scale reads, and what happens when one is promoted?

They receive changes asynchronously and can return stale data. Add or remove replicas manually. Promotion creates a standalone database and ends replication from the source.

An RDS source Region is unavailable and a cross-Region read replica exists. What recovery steps and costs should the team expect?

Promote the replica, redirect database traffic, and establish a replacement replica. Asynchronous replication can leave recent writes missing. Cross-Region snapshot and change transfer incur charges.

An RDS reporting replica must survive an Availability Zone failure without promoting it away from its source. What should the team configure?

A Multi-AZ deployment for the supported read replica. Its own standby provides failover support independently of the source deployment.

How does RDS read-replica replication pricing differ within one Region and across Regions?

Same-Region replication transfer has no charge. Cross-Region transfer of the initial snapshot and ongoing changes is billed. Replica instance charges still apply.

An RDS team has disabled automated backups on a source DB instance and wants a read replica. What must change first?

Enable backup retention on the source. The read-replica creation API requires it.

Does promoting an RDS read replica provide an instant, reversible role change?

No. Promotion reboots the replica and ends its replication relationship with the source. Plan traffic redirection and a replacement replica.

A company needs a regional disaster recovery option for an RDS database. How can a cross-Region read replica help?

Promote the replica if the source Region is unavailable, then redirect database traffic. Asynchronous replication can leave recent writes missing.

An accidental table deletion is committed on an RDS Multi-AZ DB instance. Is failover sufficient to recover the earlier data?

No. The deletion is copied to the standby. Use point-in-time recovery to create a new DB instance from an available time before the deletion.

What are the automated backup retention defaults for a newly created RDS DB instance?

One day through the API or CLI; seven days through the console. DB instance retention can be 0 to 35 days, with 0 disabling automated backups.

An RDS team wants to restore to the current second after an incident. Which value must it check first?

LatestRestorableTime. RDS uploads transaction logs every five minutes, so the latest available recovery point can lag the current time. Recovery creates a new instance.

An RDS DB instance is about to be deleted, but a team needs a recovery copy afterwards. Which backups should it preserve?

Create or keep a manual or final snapshot. These survive instance deletion. Explicitly retain automated backups if their recovery window is also needed.

Can an RDS Multi-AZ DB cluster use the same native cross-Region automated backup replication feature as a supported RDS DB instance?

No. That feature replicates DB instance snapshots and transaction logs, but does not support Multi-AZ DB clusters.

A team needs to choose an RDS backup retention period for point-in-time recovery. What determines the available recovery window?

The backup retention period. Point-in-time recovery restores an instance to an available time within that period.

Can you set the backup retention of an Aurora cluster to 0 to turn automated backups off?

No. Aurora automated backups cannot be disabled; only RDS DB instances can set retention to 0.

A team needs to recover an RDS DB instance after an accidental change. What does point-in-time recovery create?

A new DB instance restored to an available time within the backup retention period. The source is unchanged.

A team deletes an RDS DB instance without choosing to retain automated backups. What happens to its automated backups and to its manual DB snapshots?

Automated backups are deleted with the instance. Manual and final snapshots are kept until you delete them.

An Amazon RDS snapshot restore is available, but queries touching some data are slow. What recovery behavior should the team account for?

Lazy loading. Data continues loading from Amazon S3 after the instance becomes available, and access to unloaded data triggers a download.

Which AWS storage service holds Amazon RDS automated backups and manual DB snapshots?

Amazon S3. RDS uses it for backup storage.

An Amazon RDS DB instance hosts several databases. Can a manual DB snapshot back up only one selected database?

No. A DB snapshot covers the DB instance storage, including its databases.

An RDS DB instance is slow while disk requests accumulate. Which CloudWatch metrics distinguish queued work from storage service time and rate?

Compare DiskQueueDepth with ReadLatency and WriteLatency, ReadIOPS and WriteIOPS, and ReadThroughput and WriteThroughput. They measure queued requests, operation duration, operation rate, and byte rate.

An RDS DB instance repeatedly runs low on disk space. What feature can grow its allocated storage?

Enable storage autoscaling with a maximum threshold at least 10 percent above allocated storage. It grows storage up to that limit and cannot shrink it.

Which RDS CloudWatch metrics show CPU pressure, free disk space, client connection count, and supported replica delay?

CPUUtilization, FreeStorageSpace, DatabaseConnections, and ReplicaLag, respectively. FreeStorageSpace is in bytes and ReplicaLag is in seconds.

A large RDS data import fills the disk even though storage autoscaling is enabled. Can autoscaling guarantee the import will finish?

No. A large load can outpace permitted storage modifications. Allocate enough storage before the load and check the maximum threshold.

An RDS team needs to see how much CPU and memory each database process uses, in real time. Standard CloudWatch metrics are not enough. What should they turn on?

Enhanced Monitoring. Its agent on the DB instance reports OS metrics and a process list (RDS child processes, RDS processes, OS processes) to CloudWatch Logs.

Which RDS feature shows which SQL statements cause the most database load?

CloudWatch Database Insights (built on Performance Insights), which filters DB load by waits, SQL statements, hosts or users.

An Amazon RDS production database needs predictable disk I/O and consistently low latency. Which storage type fits?

Provisioned IOPS SSD storage. Choose it for demanding database I/O requirements.

How do RDS Blue/Green Deployments reduce the risk of database updates?

Test changes on a synchronized green copy, then use managed switchover. RDS checks readiness, catches up replication, and preserves production endpoint names. Switchover typically takes under a minute, depending on workload.

What are the RDS Blue/Green Deployments switchover timeout range and default?

30 to 3600 seconds; the default is 300 seconds. If switchover exceeds the timeout, RDS rolls back the switchover changes.

An RDS team has tested its green database and wants to make it production. Should it manually promote green?

No. Use blue/green switchover. Manual promotion breaks replication and leaves the deployment in Invalid configuration.

A production RDS for MySQL database cannot use Blue/Green Deployments. How can the team prepare an upgrade before a short write outage?

Upgrade a read replica and confirm it has caught up. Suspend source writes, promote the replica, then redirect writes to the upgraded instance.

After a successful RDS blue/green switchover, can a team assume old blue stays synchronized as a ready reverse-switchover target?

No. Old blue is retained and billed, but replication between blue and green stops. Plan its cleanup and any further recovery separately.

An application uses Amazon RDS Proxy during an RDS blue/green switchover. Can it keep existing proxy connections after green becomes the writer?

No. Existing proxy connections are dropped when green becomes the writer. The application must reconnect.

An RDS blue/green deployment has custom tags only on green resources. What happens to those tags at switchover?

Blue resource tags replace the green resource tags during switchover.

Short Lambda invocations repeatedly open connections and exhaust an RDS database connection budget. What should the team use?

RDS Proxy. Point clients at the proxy so it can share and reuse backend database connections rather than opening one for each client request.

An application using RDS Proxy changes session state and database connections remain dedicated to individual clients. What explains the poor reuse?

Session pinning. The proxy reserves one backend connection until the client session ends so that session state remains consistent.

An RDS application repeats expensive read queries whose results can tolerate some staleness. Which complementary technique reduces database query work?

Cache reusable query results in ElastiCache. A cache hit avoids a repeated database query. Avoid this for queries requiring strong consistency.

Does adding RDS Proxy guarantee that every incoming connection is accepted during overload?

No. The proxy can queue or throttle demand, and it rejects connections if configured limits are exceeded.

A team is choosing RDS Proxy for an Amazon RDS for Oracle database. Is that engine supported?

No. RDS Proxy supports eligible RDS MariaDB, MySQL, PostgreSQL and SQL Server versions, plus Aurora MySQL and PostgreSQL.

An application needs database connection pooling but its team cannot operate or scale proxy servers. Which Amazon RDS feature fits?

RDS Proxy. AWS manages the proxy and scales its capacity automatically with demand.

An application connects to Amazon RDS through RDS Proxy and must encrypt the client-to-proxy connection. What should its connection settings require?

TLS/SSL to the RDS Proxy endpoint. Set the TLS requirement in the client connection configuration.

A production RDS for MySQL instance was created without encryption. Compliance now requires encryption at rest. What is the supported path?

Take a manual snapshot, copy it with encryption enabled (KMS key), restore a new instance from it, and switch over.

A blue/green deployment with an encrypted green environment also works.

An encrypted RDS snapshot must be shared with another AWS account, but sharing fails. The snapshot uses the default aws/rds key. What fixes it?

Copy the snapshot with a customer managed KMS key, share the copy, and grant the other account use of that key.

How does a Multi-AZ RDS deployment reduce downtime during operating system maintenance?

RDS patches the standby, fails over to it, then patches the old primary, which becomes the standby.

A team expects a database engine version upgrade on a Multi-AZ RDS instance to cause no downtime. Is that right?

No. Engine upgrades modify primary and standby together, so the database is down until the upgrade completes.

Can you switch an existing encrypted RDS instance to a different KMS key in place?

No. The key is fixed; copy a snapshot with the new key and restore, or use blue/green.

Which mechanism encrypts data in transit between an application and an Amazon RDS database?

SSL/TLS connections to the DB instance.

All connections to an RDS for SQL Server instance must use SSL. Which setting enforces it?

Set rds.force_ssl to 1 in its DB parameter group and reboot, because the parameter is static. (For RDS for MySQL the parameter is require_secure_transport.)

Can you create an encrypted read replica to get an encrypted copy of an unencrypted RDS instance?

No. A replica follows the source encryption state. Encrypt a snapshot copy and restore it, or use a blue/green deployment.

Auditors need RDS for MySQL audit logs searchable and retained for a year. What do you configure?

Publish the audit log to CloudWatch Logs and set the log group retention to a year.

A company runs RDS for SQL Server and its auditors require the database engine itself to encrypt data files. Which feature fits?

Transparent Data Encryption (TDE), available on RDS for Oracle and RDS for SQL Server.

It uses its own keys and can run alongside RDS encryption at rest.

Copying an encrypted RDS snapshot from us-east-1 to eu-west-1 fails when the team selects the source KMS key. What is required?

A KMS key in the destination Region (eu-west-1). KMS keys are Regional, so a cross-Region copy or encrypted read replica must use a key from the target Region.

An RDS DB instance is encrypted at rest with KMS. Which related data is also encrypted?

Its logs, automated backups, read replicas and snapshots, along with the instance storage.

An Amazon RDS DB instance is in storage_full state during its automated backup window. Will RDS take its automated backup?

No. Automated backups require the instance to be available. A same-Region snapshot copy of that database also prevents them.

AWS Backup snapshot jobs for an Amazon RDS instance fail during the RDS automated backup window. What configuration can avoid the conflict?

Have AWS Backup manage both snapshots and continuous backups for the instance, or schedule the job outside the RDS backup window.

An Amazon RDS for Oracle team copies a DB snapshot to another Region and needs its option group there. What can it do in the snapshot copy request?

Set CopyOptionGroup to true. Cross-Region option group copying was added in November 2026.

How should a team deliberately test failover for an RDS Multi-AZ DB instance versus an RDS Multi-AZ DB cluster?

Use Reboot with failover for the DB instance. Use FailoverDBCluster for the DB cluster. Stop transactions before the abrupt instance failover.

An RDS Proxy workload must leave database connections available for other users. Which setting caps the proxy connection pool?

MaxConnectionsPercent. It caps backend connections relative to database max_connections. Compare DatabaseConnections with MaxDatabaseConnectionsAllowed to monitor actual usable capacity.

What are the default RDS Proxy ConnectionBorrowTimeout and IdleClientTimeout values?

ConnectionBorrowTimeout is 120 seconds. IdleClientTimeout is 1800 seconds. They control waiting for backend capacity and closing idle client connections, respectively.

When can RDS storage autoscaling start a storage modification?

Free space must be at or below 10 percent for at least five minutes, prior storage optimization must be complete, and fewer than four storage modifications must have occurred in the past 24 hours.

How does RDS storage autoscaling choose the size of a growth increment?

Use the greatest of 10 GiB, 10 percent of allocated storage, or predicted growth exceeding allocated storage over seven hours based on the past hour of FreeStorageSpace.

Why can RDS CPU numbers from Enhanced Monitoring differ from the CloudWatch CPUUtilization metric?

CloudWatch measures from the hypervisor, Enhanced Monitoring from an agent inside the instance, and the hypervisor does a little work of its own.

Você concluiu todos os tópicos da DOP-C02!

Seu badge ficou dourado. Próximo passo: agendar a prova na AWS. Depois de passar, adicione-se ao Quem passou.

Compartilhar

Conte que você concluiu esta certificação

Concluí todos os tópicos da AWS Certified DevOps Engineer - Professional (DOP-C02) no Easy Review. Venha estudar também!