https://www.udemy.com/aws-certified-solutions-architect-associate/learn/v4/t/lecture/4782126?start=0
Automated Backups
Automated Backups allow you to recover your database to any point in time within a “retention period”. Retention period can be between 1 and 35 days. (Default 7 Days.) Automated Backups will take a full daily snapshot and will also store transaction logs throughout the day. When you do a recovery, AWS will first choose the most recent daily backup, then apply transaction logs relevant to that day. This allows you to do a “point in time” recovery down a second, within the retention period.
Automated Backups are enabled by default. The backup data is stored in S3 and you get free storage space equal to the size of your database. So if you have an RDS instance of 10GB, you will get 10GB worh of storage.
Backups are taken within a defined window. During the backup window, storage I/O may be suspended while your data is being backed up and you may experience elevated latency.
DB Snapshots
DB Snapshots are done manually. They are stored even after you delete the original RDS instance, unlike automated backups.
Encryption
Encryption at rest is supported for MySQL, Oracle, SQL Server, PostgreSQL & MariaDB. Encryption is done using AWS Key Management Service (KMS). Once an RDS instance is encrypted, the data stored at rest in the underlying storage is encrypted, as are its automated backups, read replicas and snapshots.
You cannot directly encrypt an existing DB instance. Instead, create a new instance with encryption enabled, then migrate your data into it.
Restoring an RDS Database
- You can copy a snapshot to different regions to create a DR site.
- You can re-scale an instance by restoring a snapshot to a new DB Instance Class.
Multi-AZ
Multi-AZ instances use asynchronous replication to a different Availability Zone. If the primary instance fails, AWS will automatically failover to the second location and will continue to use the same DNS endpoint, so there is no need to reconfigure your connecting instances.
Multi-AZ allows you to have an exact copy of your production database in another Availability Zone. AWS handles the replication for you, so when your production database is written to, this write will automatically be synchronized to the stand by database.
In the event of planned database maintenance, DB Instance failure, or an Availability Zone failure, RDS will automatically failover to the standby so that database operations can resume quickly without administrative intervention.
Read Replica
Read Replicas are Read-Only replicas of your database. These allow different web instances to read from different replicas in order to improve performance. A single database may have up to 5 Read Replica copies.
Read Replicas allow you to have a read only copy of your production database. This is achieved by using Asynchronous replication from the Primary RES instance to the read replica. You use read replicas primarily for read-heavy database workloads.
- You must have automatic Backups enabled in order to deploy read replicas.
- Read replicas are NOT to be used for HA / DR. Use Multi-AZ for that.
- You can have read replicas of read replicas, but watch out for latency issues.
- Each read replica will have its own DNS endpoint.
- You cannot have Read Replicas that have Multi-AZ
- You can create Read Replicas of Multi-AZ source databases.
- Read Replicas can be promoted to be their own databases, however this breaks the replication.
- MySQL and MariaDB allow Read Replicas to be placed in a different Region. This is not available for PostgreSQL, SQL Server or Oracle.