Deploy Automated AWS Backup with Cross-Region Replication

By Pulumi Team
Published
Updated

The Challenge

You need automated backups for your AWS infrastructure with cross-region replication for disaster recovery. Manual backup processes are unreliable, prone to human error, and often neglected until data loss occurs. AWS Backup provides centralized, policy-driven backup management, but configuring it correctly with retention policies, cross-region replication, and failure alerting requires deliberate infrastructure setup.

What You'll Build

  • Centralized backup vault with deletion protection
  • Daily automated backups on a defined schedule
  • 7-day retention policy with automatic cleanup
  • Cross-region backup copies for disaster recovery
  • SNS notifications for backup job failures

Neo Try This Prompt in Pulumi Neo

Run this prompt in Neo to deploy your infrastructure, or edit it to customize.

Best For

Use this prompt when you need to set up automated backups for AWS resources with disaster recovery capabilities. Appropriate as a foundational layer for any production workload, compliance requirements that mandate regular backups, or as a starting point before building a full multi-region disaster recovery architecture.

Architecture Overview

This architecture uses AWS Backup as the central service for managing backup schedules, retention policies, and cross-region replication. Rather than scripting individual snapshots per resource, AWS Backup provides a single control plane that applies consistent backup policies across EBS volumes, RDS databases, DynamoDB tables, and other supported resources.

The backup vault is the storage container for all recovery points. Enabling deletion protection on the vault prevents accidental or malicious deletion of backups, an important safeguard given that backups are often the last line of defense during a data loss event. Even administrators with broad IAM permissions cannot delete recovery points from a vault with deletion protection enabled unless the protection is explicitly removed first.

Cross-region backup copies address the scenario where the primary region becomes unavailable. If backups exist only in the same region as the resources they protect, a regional outage could make both the resources and their backups inaccessible simultaneously. Copying backups to a second region ensures recovery is possible even during a full regional failure, at the cost of additional storage and data transfer charges.

Backup Vault

The backup vault stores recovery points with deletion protection enabled. Vault access policies control which IAM principals can create, describe, and restore backups. A separate vault in the disaster recovery region receives cross-region copies, maintaining isolation between primary and DR backup storage.

Backup Plan and Schedule

The backup plan defines when and how backups occur. A daily schedule creates recovery points at a consistent time, and the 7-day retention policy automatically deletes older recovery points to control storage costs. The plan uses resource selection rules (by tag or resource type) to determine which resources are included, making it easy to extend coverage as new resources are provisioned.

Cross-Region Replication

Each daily backup is automatically copied to a vault in a second AWS region. The copy job runs after the primary backup completes, ensuring the DR region always has a recent recovery point. Cross-region copies inherit their own retention policy, which can differ from the primary region if longer DR retention is required.

Failure Notifications

SNS notifications alert the operations team when backup jobs fail, whether due to permission issues, resource unavailability, or service errors. Without these notifications, backup failures can go undetected for days or weeks, creating a false sense of protection. The notification topic can deliver alerts through email, Slack integration, or PagerDuty depending on your incident response workflow.

Common Customizations

  • Extend to additional resource types: Modify the prompt to include RDS databases, DynamoDB tables, EFS file systems, or Aurora clusters in the backup plan alongside EBS volumes.
  • Add compliance-driven retention: Request longer retention periods (30 days, 1 year, or 7 years) for backups that must meet regulatory requirements such as HIPAA or SOC 2.
  • Implement backup windows: Specify a backup window during off-peak hours to minimize the performance impact of snapshot creation on production workloads.
  • Add restore testing: Ask for a Lambda function that periodically restores a backup to a temporary environment and runs validation checks, confirming that backups are actually recoverable.