AWS Certified DevOps Professional: Automated Recovery Procedures Study Guide
Recovery procedures
AWS Certified DevOps Professional: Automated Recovery Procedures Study Guide
This guide covers the essential strategies and tools required to implement automated recovery processes on AWS, focusing on achieving specific RTO and RPO targets as required for the DOP-C02 exam.
Learning Objectives
- Define and differentiate between Recovery Time Objective (RTO) and Recovery Point Objective (RPO).
- Compare the four main Disaster Recovery (DR) strategies: Backup & Restore, Pilot Light, Warm Standby, and Multi-Site Active-Active.
- Identify recovery procedures for stateful services like Amazon RDS and Amazon Aurora.
- Automate backups and cross-Region replication using AWS Backup and AWS Elastic Disaster Recovery (DRS).
- Implement failover mechanisms using Route 53 and Application Load Balancers (ALB).
Key Terms & Glossary
- RTO (Recovery Time Objective): The maximum acceptable delay between the interruption of service and restoration of service.
- RPO (Recovery Point Objective): The maximum acceptable amount of data loss measured in time (e.g., losing the last 15 minutes of transactions).
- Failover: The process of automatically or manually switching to a redundant or standby computer server, system, hardware component, or network upon the failure of the previously active one.
- Pilot Light: A DR strategy where a minimal version of the environment is always running in the cloud, primarily containing the data layer (databases/volumes).
- Warm Standby: A DR strategy where a scaled-down but functional version of the full environment is always running in another Region.
- Cross-Region Read Replica: A copy of a database located in a different geographical Region that provides asynchronous replication for DR.
The "Big Idea"
Resiliency is a shared responsibility, but as a DevOps Engineer, you are the architect of the Recovery Loop. High Availability (Multi-AZ) protects you from data center failures, but Disaster Recovery (Multi-Region) protects you from catastrophic regional events. Your goal is to move from manual, error-prone restoration to automated, tested, and code-driven failover processes.
Formula / Concept Box
| Concept | Metric | Focus |
|---|---|---|
| RPO | Data Integrity / Loss | |
| RTO | Service Availability / Downtime | |
| Availability | Percentage of Uptime |
Hierarchical Outline
- Disaster Recovery Metrics
- RTO: Focused on downtime; measured from incident to restoration.
- RPO: Focused on data loss; measured by the interval between the last backup and the incident.
- AWS DR Strategies (Spectrum of Cost vs. Speed)
- Backup & Restore: Lowest cost, highest RTO/RPO. Uses snapshots and AMIs.
- Pilot Light: Core data is live; application servers are switched off or exist as AMIs.
- Warm Standby: "Business as usual" on a smaller scale. Faster than Pilot Light.
- Multi-Site Active-Active: Zero RTO/RPO potential. Traffic is split between regions.
- Database Recovery Mechanics
- Amazon RDS: Uses Multi-AZ for high availability and Cross-Region Read Replicas for DR. Failover involves promoting the replica to a standalone instance.
- Amazon Aurora: Global Databases allow for sub-second data replication and promotion of secondary regions with minimal RTO.
- Automation & Orchestration Tools
- AWS Backup: Centralized management for RDS, EFS, EBS, and S3. Supports cross-Region/cross-account backup.
- AWS Elastic Disaster Recovery (DRS): Block-level replication for physical, virtual, and cloud servers into a low-cost staging area.
- Route 53: Health checks and DNS failover (Failover Routing Policy).
Visual Anchors
DR Strategy Spectrum
RTO vs RPO Timeline
Definition-Example Pairs
-
Term: Cross-Region Snapshot Copy
-
Definition: The automated process of duplicating an EBS or RDS snapshot to a different geographical area to protect against regional failure.
-
Real-World Example: A banking application in
us-east-1automatically copies its nightly RDS snapshots tous-west-2. If Northern Virginia goes offline, the database is restored in Oregon using the copied snapshot. -
Term: DNS Failover
-
Definition: A mechanism where a DNS resolver redirects traffic to a secondary IP/endpoint when the primary endpoint fails a health check.
-
Real-World Example: Route 53 monitors a website's ALB. If the ALB stops responding, Route 53 updates the DNS record to point to a static "Maintenance" page hosted on S3.
Worked Examples
Scenario: Recovering an Aurora Global Database
Problem: Your primary Region (us-east-1) suffers a complete service disruption. You need to recover your Aurora cluster in eu-west-1 with minimal data loss.
Steps:
- Identify the Failure: CloudWatch Alarms trigger based on failed health checks for the primary cluster.
- Remove Secondary from Cluster: Using the CLI or Console, remove the secondary cluster from the Global Database to make it standalone.
- Promote Secondary: Promote the secondary cluster. Aurora handles the conversion of the read-only instances to read-write.
- Update DNS: Update the Route 53 CNAME or use a Failover Routing policy to point the application endpoint to the new cluster in
eu-west-1. - Verify: Check application logs to ensure DB connectivity is restored.
Checkpoint Questions
- Which DR strategy involves keeping a scaled-down but fully functional version of your application always running in a second Region?
- If an organization requires an RPO of 0, which AWS database feature or service is most appropriate?
- True or False: AWS Backup can be used to copy backups across different AWS accounts.
- In a Pilot Light scenario, are the application servers (EC2) typically running or stopped?
▶Click to see answers
- Warm Standby.
- Multi-Site Active-Active (using Aurora Global Database or DynamoDB Global Tables).
- True.
- Stopped (or not provisioned until needed, usually as AMIs).
Muddy Points & Cross-Refs
- Multi-AZ vs. Multi-Region: Don't confuse them! Multi-AZ is for High Availability (protects against one data center failing). Multi-Region is for Disaster Recovery (protects against a whole geographic area failing).
- Aurora vs. RDS Failover: In RDS, you promote a Read Replica. In Aurora Global Database, you can perform a "Failover" which keeps the global structure, or "Remove from Global" to promote faster in an emergency.
- AWS DRS vs. AWS Backup: AWS Backup is for AWS native resources (S3, RDS). AWS DRS is for block-level replication of the OS and applications, often used for migrating or protecting on-premises servers to AWS.
Comparison Tables
| Strategy | RTO (Time) | RPO (Data) | Cost | Complexity |
|---|---|---|---|---|
| Backup & Restore | Hours | 24 Hours | $ | Low |
| Pilot Light | 10s of Minutes | ~15 Minutes | $$ | Medium |
| Warm Standby | Minutes | Near Real-time | $$$ | High |
| Multi-Site | Near Zero | Zero | $$$$ | Very High |
[!IMPORTANT] For the DOP-C02 exam, always choose the recovery strategy that meets the business RTO/RPO requirements for the lowest cost. If the requirement is "minimal cost" and the RTO is "24 hours," choose Backup & Restore.