Disaster Recovery Plan
Disaster Recovery Plan
Project:
{{PROJECT_NAME}}Drop Version:{{VERSION}}0.1.0 Date:{{DATE}}2026-02-23 Author:{{AUTHOR}}Platform Architect (AI) Status:Draft |In Review| ApprovedReviewers:{{REVIEWERS}}Alem Bašić (CEO)
Document History
| Version | Date | Author | Changes |
|---|---|---|---|
| 0.1 |
1. Business Continuity Overview
This plan documents the procedures to recover {{PROJECT_NAME}}Drop services following a disaster event (data centerinfrastructure failure, data corruption, security breach, or catastrophictotal failure)region outage). Drop is a PSD2 pass-through payment application — it never holds customer funds, so there is no risk of customer money being lost due to Drop infrastructure failure. The primary recovery concern is service availability and data integrity.
Plan Owner: {{DR_OWNER}}Alem Bašić (CEO), [email protected], +47 40 47 42 51
Plan Reviewer: {{DR_REVIEWER}}John (AI Director), Slack #drop-alerts
Last Tested: {{LAST_TEST_DATE}}TBD — initial DR drill not yet conducted
Next Scheduled Test: {{NEXT_TEST_DATE}}Q2 2026 (App Runner restart + RDS snapshot restore)
Disaster types covered:
InfrastructureApp Runner service failure(AZ/regionoroutage)crashDataRDScorruptiondatabase failure oraccidentaldatadeletioncorruption- Security incident (
ransomware,unauthorizeddataaccess,breach)credential compromise) Vendor/providerFull region outage (eu-west-1)- Catastrophic application failure (bad deployment)
2. RPO / RTO Targets Per Service Tier
| Tier | Description | RPO | RTO | ||
|---|---|---|---|---|---|
| Tier 1 — Critical | Core user-facing |
||||
| Tier 2 — Important | Supporting |
1 hour | |||
| Tier 3 — Standard |
3. Service Tier Classification
| Service | Tier | ||
|---|---|---|---|
/api/transactions/remittance) |
|||
/api/transactions/qr-payment) |
|||
/api/health) |
|||
| Merchant dashboard | Merchant ops impacted | ||
| Notifications | 2 | UX degraded | |
| Audit log | 3 | Compliance — retained, not real-time | |
| AML alerts | 3 | Reviewed periodically, not real-time |
4. Infrastructure Overview
Production
- Service: AWS App Runner
- Region: eu-west-1 (Ireland)
- Service ARN:
arn:aws:apprunner:eu-west-1:324480209768:service/drop-web/8e45b0d335304487a1880f4e32d6aeec - Service URL:
https://9ef3szvvsb.eu-west-1.awsapprunner.com - ECR Repository:
324480209768.dkr.ecr.eu-west-1.amazonaws.com/drop-web
Database (Production)
- RDS Instance:
drop-db - Endpoint:
drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com:5432 - DB Name:
dropapp - DB User:
dropuser - Backup Strategy: Automated daily snapshots, 7-day retention
- Backup Window: 23:24–23:54 UTC daily
- PITR: Enabled (5-minute granularity)
Staging
- Platform: Fly.io, region
arn(Stockholm) - App Name:
drop-staging - Database: SQLite ephemeral volume — no automated backup
4.5. Backup Strategy
4.Production RDS PostgreSQL
- Automated Snapshots: Daily at 23:24 UTC
- Retention Period: 7 days
- Point-in-Time Recovery (PITR): Enabled — any point within last 7 days, 5-minute granularity
- Manual Snapshots: Created before every major deployment or migration
- Snapshot verification: Run quarterly
ECR Docker Images
- All pushed images retained in ECR repository
- Rollback capability: Redeploy any previous image tag via
aws apprunner start-deployment - Lifecycle policy: Delete untagged images after 7 days, keep last 10 tagged releases
Staging (Fly.io)
- No automated backup — ephemeral SQLite storage
- Manual backup procedure:
flyctl ssh console -a drop-staging sqlite3 /app/data/drop.db ".backup /app/data/backup-$(date +%Y%m%d).db"
6. Recovery Procedures
Scenario 1: App Runner Service Down
Symptoms:
- BetterStack alert:
Drop Health Check is DOWN - Slack
#drop-ops: critical alert - App Runner service status not
RUNNING
Investigation:
# Check service status
aws apprunner describe-service \
--service-arn arn:aws:apprunner:eu-west-1:324480209768:service/drop-web/8e45b0d335304487a1880f4e32d6aeec \
--region eu-west-1
# View recent logs (last 10 minutes)
aws logs tail /aws/apprunner/drop-web/8e45b0d335304487a1880f4e32d6aeec/application \
--follow --since 10m --region eu-west-1
# Check deployment history
aws apprunner list-operations \
--service-arn arn:aws:apprunner:eu-west-1:324480209768:service/drop-web/8e45b0d335304487a1880f4e32d6aeec \
--region eu-west-1
Recovery Option A: Restart (preferred)
aws apprunner start-deployment \
--service-arn arn:aws:apprunner:eu-west-1:324480209768:service/drop-web/8e45b0d335304487a1880f4e32d6aeec \
--region eu-west-1
RTO: 5–10 minutes | RPO: 0 (no data loss)
Recovery Option B: Rollback to previous image
# List recent ECR images
aws ecr describe-images \
--repository-name drop-web \
--region eu-west-1 \
--query 'sort_by(imageDetails,&imagePushedAt)[-5:]'
# Update App Runner image tag via console or update the deployment workflow
# Then trigger new deployment
RTO: 15–20 minutes | RPO: 0 (no data loss)
Scenario 2: RDS Database BackupsFailure
Symptoms:
/api/healthreturns{"status":"down"}(HTTP 503)- BetterStack + Slack alerts fire
- App Runner logs show connection timeout to RDS
Investigation:
# Check RDS status
aws rds describe-db-instances \
--db-instance-identifier drop-db \
--region eu-west-1 \
--query 'DBInstances[0].DBInstanceStatus'
# Check available snapshots
aws rds describe-db-snapshots \
--db-instance-identifier drop-db \
--region eu-west-1 \
--query 'DBSnapshots[?SnapshotType==`automated`] | sort_by(@, &SnapshotCreateTime)[-5:]'
# Check events
aws rds describe-events \
--source-identifier drop-db \
--source-type db-instance \
--region eu-west-1 --duration 60
Recovery Option A: Restore from automated snapshot
LATEST=$(aws rds describe-db-snapshots \
--db-instance-identifier drop-db --region eu-west-1 \
--query 'DBSnapshots[?SnapshotType==`automated`]|sort_by(@,&SnapshotCreateTime)[-1].DBSnapshotIdentifier' \
--output text)
aws rds restore-db-instance-from-db-snapshot \
--db-instance-identifier drop-db-restored \
--db-snapshot-identifier $LATEST \
--db-instance-class db.t4g.micro \
--region eu-west-1
aws rds wait db-instance-available --db-instance-identifier drop-db-restored --region eu-west-1
# Update DATABASE_URL in App Runner environment with new endpoint
NEW_EP=$(aws rds describe-db-instances --db-instance-identifier drop-db-restored \
--query 'DBInstances[0].Endpoint.Address' --output text --region eu-west-1)
RTO: 30 minutes | RPO: 24 hours (last snapshot)
Recovery Option B: Point-in-Time Recovery (PITR)
aws rds restore-db-instance-to-point-in-time \
--source-db-instance-identifier drop-db \
--target-db-instance-identifier drop-db-pitr \
--restore-time $(date -u -d '1 hour ago' '+%Y-%m-%dT%H:%M:%SZ') \
--db-instance-class db.t4g.micro \
--region eu-west-1
RTO: 30 minutes | RPO: 5 minutes (PITR granularity)
Scenario 3: Data Corruption
Symptoms:
- Application reports data inconsistencies
- User-reported missing or incorrect transactions
- Audit log shows unexpected DELETE/UPDATE operations
Investigation:
# Check for soft-deleted users
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "SELECT COUNT(*) FROM users WHERE deleted_at IS NOT NULL;"
# Check recent suspicious audit log entries
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "SELECT * FROM audit_log WHERE action IN ('DELETE','UPDATE') ORDER BY timestamp DESC LIMIT 50;"
Recovery: Selective restore from clean snapshot (see Scenario 2 recovery steps) + merge affected tables.
RTO: 1–2 hours (selective) | RPO: Depends on snapshot age
Scenario 4: Full Region Outage (eu-west-1)
Current State: No automated cross-region failover. Manual failover to eu-north-1 (Stockholm) required.
Investigation:
- Check AWS Health Dashboard: https://health.aws.amazon.com/health/status
- Verify RDS snapshot accessibility from eu-west-1
Manual Failover to eu-north-1:
# 1. Copy latest RDS snapshot to eu-north-1
LATEST=$(aws rds describe-db-snapshots --db-instance-identifier drop-db --region eu-west-1 \
--query 'DBSnapshots[?SnapshotType==`automated`]|sort_by(@,&SnapshotCreateTime)[-1].DBSnapshotIdentifier' \
--output text)
aws rds copy-db-snapshot \
--source-db-snapshot-identifier arn:aws:rds:eu-west-1:324480209768:snapshot:$LATEST \
--target-db-snapshot-identifier drop-db-failover-$(date +%Y%m%d) \
--region eu-north-1
# 2. Restore RDS in eu-north-1
aws rds restore-db-instance-from-db-snapshot \
--db-instance-identifier drop-db-failover \
--db-snapshot-identifier drop-db-failover-$(date +%Y%m%d) \
--db-instance-class db.t4g.micro \
--region eu-north-1
# 3. Create ECR repository in eu-north-1 and push latest image
# 4. Create App Runner service in eu-north-1
# 5. Update DNS when getdrop.no is active
RTO: 2–4 hours (manual) | RPO: Up to 24 hours (last snapshot)
Scenario 5: Security Incident
Symptoms:
- Suspicious audit log entries
- Unauthorized access attempts
- AML alerts triggered for unusual activity
- Sumsub KYC bypass attempt
Investigation:
# Check audit log for recent suspicious activity
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "SELECT * FROM audit_log WHERE timestamp > NOW() - INTERVAL '24 hours' ORDER BY timestamp DESC;"
# Check AML alerts
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "SELECT * FROM aml_alerts WHERE status = 'open' OR created_at > NOW() - INTERVAL '24 hours';"
# Check CloudTrail for AWS API activity
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=ResourceName,AttributeValue=drop-db \
--region eu-west-1 --max-results 50
Containment:
# 1. Revoke compromised sessions immediately
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "UPDATE sessions SET revoked = 1 WHERE user_id IN (SELECT user_id FROM aml_alerts WHERE status = 'open');"
# 2. Disable affected users
psql -h drop-db.czu2qe4quy4v.eu-west-1.rds.amazonaws.com -U dropuser -d dropapp \
-c "UPDATE users SET kyc_status = 'rejected' WHERE id IN (SELECT user_id FROM aml_alerts WHERE severity = 'critical');"
# 3. Rotate database credentials
aws rds modify-db-instance \
--db-instance-identifier drop-db \
--master-user-password <new-password> \
--apply-immediately --region eu-west-1
# 4. Take forensic snapshot
aws rds create-db-snapshot \
--db-instance-identifier drop-db \
--db-snapshot-identifier drop-db-incident-$(date +%Y%m%d-%H%M) \
--region eu-west-1
# 5. Rotate JWT_SECRET (invalidates all sessions)
# Generate: openssl rand -base64 48
# Update in AWS Secrets Manager + redeploy App Runner
Post-containment:
- Analyze audit logs — identify scope of breach
- File STR (Suspicious Transaction Report) if financial crime suspected
- Notify Finanstilsynet if user PII compromised (GDPR requirement, 72-hour window)
- User communication if required by GDPR Art. 34
RTO: Immediate containment (session revocation) / 24–48 hours full investigation
7. RTO / RPO Summary
Automated backup tool: {{BACKUP_TOOL}}
Backup encryption: AES-256, key managed in {{KMS_TOOL}}
Cross-region copy: {{CROSS_REGION}}
4.2 File / Object Storage Backups
| 30 |
4.3 Configuration Backups
4.4 Backup Testing Schedule
| Full |
||||
| Security incident containment |
5. Failover Procedures
5.1 Automated Failover
Monitoring automatic failover:
Alert fires:MultiAZFailoverCloudWatch event or equivalentOn-call notified immediatelyNo manual action required, but on-call must confirm recovery
5.2 Manual Failover Steps
Prerequisite: Automatic failover has NOT occurred or has failed.
Database Manual Failover (Tier 1)
Confirm primary is unavailable:ping {{DB_PRIMARY_HOST}}— should timeoutConnect to standby:psql {{STANDBY_HOST}}Promote standby to primary:SELECT pg_promote();Update DNS recorddb.{{INTERNAL_DOMAIN}}→{{STANDBY_HOST}}DNS TTL: Ensure TTL was set to 60s pre-incident (if not, wait {{DNS_TTL}} seconds)Verify applications are reconnecting: Check application logs for successful DB connectionsPage on-call to verify all services healthy
Regional Failover (Catastrophic)
Declare DR event (approval from {{DR_AUTHORITY}})Confirm primary region {{PRIMARY_REGION}} is unreachableActivate standby in {{DR_REGION}}:terraform apply -var-file=envs/dr.tfvarsRestore database from latest cross-region snapshotUpdate Route 53 / DNS to point to {{DR_REGION}} endpointsRun smoke tests:bash scripts/smoke-tests.sh {{DR_REGION}}Notify stakeholders (see Communication Plan)Monitor enhanced metrics for {{MONITOR_PERIOD}}h
6. Recovery Procedures Per Service
Tier 1 Services
| |||
|
Tier 2 Services
Tier 3 Services
7. DR Drill Schedule & Scenarios
Drill Scenarios to Cover:
Database primary failure (automatic failover test)Accidental data deletion (point-in-time restore)Single AZ outage (multi-AZ failover)Full region failure (cross-region DR)Ransomware/data corruption (restore from offline backup)CDN outage (origin fallback)Secret store unavailable (cached credentials)
8. Communication Plan During DR EventContacts
Internal Communications
External Communications
Communication templates: See go-live-runbook.md communication section
9. War Room Setup
War Room: {{WAR_ROOM_LINK}}
Bridge Line: {{BRIDGE_NUMBER}}
Document: Live incident doc created at: {{INCIDENT_DOC_TEMPLATE}}
Roles during DR event:
| Role | |||
|---|---|---|---|
| Primary Incident |
|||
#drop-alerts |
|||
| Sumsub Support | [email protected] | ||
| BankID Support | Vipps MobilePay (BankID operator) | Per contract |
10.9. Post-RecoveryRunbook Verification ChecklistMaintenance
Review Schedule
- Quarterly
Allreview:TierVerify1allservicesARNs,healthyendpoints,(healthandcheckscommandspassing)still valid - After
Erroranyrateincident:backUpdatetowithbaselinelessons(< {{ERROR_BASELINE}}%)learned - Before
P99majorlatencyreleases:backVerifyto baseline (< {{P99_BASELINE}}ms) Database connections stableReplication lag < {{REPLICATION_LAG}}s (if applicable)Backup jobs resumedbackup andcompletedrollbacksuccessfullyprocedures Monitoring and alerting functionalNo data loss confirmed (or data loss quantified and documented)All Tier 2 services healthyStakeholders notified of recoveryStatus page updated to "Resolved"Incident timeline documentedPost-mortem scheduled (within {{POSTMORTEM_SLA}}h)work
Test 11.Schedule
- Q2 2026: Full DR
TestdrillResults— App Runner restart + RDS snapshot restore to temp instance - Quarterly: App Runner rollback test
- Monthly: Verify automated RDS snapshot creation
Change Log
| Date | ||||||
|---|---|---|---|---|---|---|
Related Documents
- Deployment Architecture
- Monitoring & Observability
OperationalDR Runbook SourceIncidentOperationalReportPost-MortemRunbook
Approval
| Role | Name | Date | Signature |
|---|---|---|---|
| Author | Platform Architect (AI) | 2026-02-23 | |
| Reviewer | |||
| Approver | Alem Bašić |