AWS Backup: Vaults, Plans, and Policies
AWS Backup is a centralized backup service that automates data protection across AWS services. It supports EBS, EC2, RDS, DynamoDB, EFS, FSx, and Storage Gateway from a single console.
Backup vaults are containers for backups. Create vaults for different purposes: production-vault for critical data, compliance-vault for regulated data, dev-vault for test environments. Apply encryption keys (KMS) and access policies to each vault. Vaults can be shared across accounts using AWS Organizations.
Backup plans define when and how backups are taken. A plan includes rules that specify: the backup frequency (daily, weekly), the time window (3:00-5:00 AM UTC), the retention period (35 days, 12 months), and the lifecycle (transition to cold storage after 30 days, delete after 365 days). Assign resources to plans using tags or resource ARNs.
Backup policies are organization-wide templates. An organization admin creates a policy (for example, all accounts must back up RDS daily for 35 days) and attaches it to OUs or accounts. Resources in those accounts automatically inherit the policy. This ensures consistent backup across the organization without individual account configuration.
Resource assignment uses tags or conditions. A backup plan rule might assign all resources tagged Environment=production to the plan. New resources tagged Environment=production are automatically included. This tag-based approach scales with dynamic infrastructure.
Recovery: AWS Backup provides point-in-time recovery (PITR) for supported services. Restore an RDS database to any point in the last 35 days. Restore an EBS volume from a specific backup. Restore an entire EC2 instance including its attached volumes. Recovery is initiated from the backup vault and creates new resources.
Backup audit vault logs all backup and restore activities. Enable in the backup vault to track who created, restored, or deleted backups. This is required for compliance frameworks like SOC 2, HIPAA, and PCI DSS.
Snapshot Strategies for EC2, RDS, and EBS
EC2 AMI snapshots capture the entire instance state including the root volume and attached EBS volumes. Create AMIs before major changes (deployments, upgrades) as rollback points. Store AMIs across regions for DR. Automate AMI creation with AWS Backup or Lambda triggered by CloudWatch Events.
EBS snapshots capture point-in-time copies of EBS volumes. Snapshots are incremental (only changed blocks are copied to S3, reducing cost and time). Create snapshots before risky operations: database upgrades, application deployments, or infrastructure changes. Snapshot lifecycle policies automatically delete old snapshots.
RDS automated backups enable point-in-time recovery. RDS retains automated backups for a configurable period (1 to 35 days). When enabled, RDS performs daily snapshots and captures transaction logs. Restore to any second within the retention window. Automated backups are deleted when the RDS instance is deleted unless a final snapshot is taken.
RDS manual snapshots are permanent until explicitly deleted. Create manual snapshots before major changes. Unlike automated backups, manual snapshots persist independently of the RDS instance. Share snapshots across accounts for DR or testing.
DynamoDB on-demand backup creates full table backups instantly. On-demand backups have no performance impact and are available immediately. Restore to a new table in the same or different account. On-demand backups are retained until explicitly deleted.
Snapshot best practices: Tag all snapshots with Environment, BackupType, and RetentionDate. Use lifecycle policies to automatically clean up expired snapshots. Copy critical snapshots to another region for DR. Encrypt snapshots using KMS customer-managed keys for compliance.
Retention Policies and Cross-Account Backup
Retention policies balance cost against recovery requirements and compliance. Too short risks missing data recovery needs; too long wastes storage costs. Design retention based on use case:
Operational backups (30-90 days): Daily backups with 30-day retention for operational recovery. A developer accidentally deletes a table on Monday; restore from Friday's backup. Weekly backups with 90-day retention for catching less recent issues.
Compliance backups (1-7 years): Financial records, healthcare data, and government contracts often require specific retention periods. SOC 2 may require 1 year; HIPAA requires 6 years; PCI DSS requires 1 year. Tag compliance backups separately and apply longer retention.
Archive backups (indefinite or very long): Legal holds, intellectual property, or regulatory requirements may demand indefinite retention. Transition to Glacier Deep Archive for cost-effective long-term storage. A 1TB backup in S3 Standard costs $23/month; the same backup in Glacier Deep Archive costs $1/month.
Cross-account backup creates backups in a dedicated backup account. This isolates backup data from production accounts, preventing accidental deletion. An organization backup account receives backups from all member accounts. Apply strict access policies: only the backup team can restore; no one can delete.
Cross-account architecture: Member accounts send backups to a central backup vault in the backup account using AWS Organizations backup policies. The backup account applies its own KMS keys for encryption. Restore operations require cross-account IAM roles. This provides an air gap between production and backup data.
Backup validation: Verify that backups can actually be restored. AWS Backup supports restore testing: schedule automated restore tests that create temporary resources from backups, verify data integrity, then clean up. Failed tests trigger alerts. This catches backup corruption before you need to recover.
Quiz
1. What is the primary benefit of using AWS Backup over manual snapshot scripts?
2. Why copy critical snapshots to another region?
3. What is the difference between incremental and full EBS snapshots?
4. Why store backups in a dedicated cross-account backup account?
Flashcards
Question
AWS Backup components
Click to reveal answer
Answer
Backup vaults (containers for backups), Backup plans (when/how to back up), Backup policies (organization-wide templates), Resource assignment (tag-based or ARN-based).
Question
EBS snapshot characteristics
Click to reveal answer
Answer
Incremental (only changed blocks), persistent until deleted, cross-region copy for DR, lifecycle policies for automatic cleanup.
Question
RDS automated vs manual snapshots
Click to reveal answer
Answer
Automated: daily + transaction logs, 1-35 day retention, deleted when instance deleted. Manual: persistent, cross-account share, survive instance deletion.
Question
Cross-account backup architecture
Click to reveal answer
Answer
Member accounts send to central backup account via Org policies. Backup account applies KMS keys and strict access. Restore requires cross-account IAM roles.
Revision Notes
Key Takeaways
- 1. AWS Backup centralizes and automates backup across EBS, RDS, DynamoDB, EFS, and more
- 2. Backup plans define frequency, retention, and lifecycle; policies enforce across organization
- 3. Cross-account backup isolates backup data from production to prevent accidental deletion
- 4. Always validate backups with restore testing to catch corruption before you need to recover
Interview Tips
- • Design a backup strategy for a multi-account AWS organization with compliance requirements
Cheat Sheet
AWS Backup: vaults (containers), plans (schedule/retention), policies (org-wide). EBS: incremental snapshots. RDS: automated (35d max) + manual. Cross-account: central vault, KMS keys, strict access. Restore testing: validate backups can actually be restored. Glacier Deep Archive for long-term retention ($1/TB/month).