Creating Multiple AWS Backup Vaults to protect resources
Ensuring you have regular backups, i.e., snapshots, is a fundamental step in creating reliable, fault-tolerant solutions on the AWS platform.
Luckily, AWS provides a fully managed, easy to use solution which allows us to manage snapshots for several AWS services centrally.
In this article, I’ll discuss how we deployed multiple AWS Backup vaults for a fully managed WordPress deployment.
Before we discuss the details of the AWS Backup solution itself, let’s have a quick look at the overall solution.
We deployed a highly-available, fault-tolerant WordPress site for the customer by using two Availability Zones (AZ) in a single AWS Region.
AWS Backup
AWS Backup is a Regional service that comes with a single backup vault called ‘Default.’ To provide more flexibility, we created individual vaults for each of the (supported) AWS services shown in the reference architecture above - Elastic File System (EFS), Elastic Block Store (EBS), and Elastic Compute Cloud (EC2).
Here’s an example of how we deployed the Backup Vault for EFS:
|
|
To finish the setup, we need both a Backup Plan and a Backup Selection. Let’s start with the Backup Plan for EFS.
The Backup Plan is associated with a Vault and provides the rules used by the Backup service - think schedule and retention policy.
Here’s the corresponding CloudFormation definition for the EFS Backup Plan:
|
|
The last piece of our Backup deployment is selecting which AWS resources we want to protect using AWS Backup. Identifying the resources to be backed up is done via tagging.
Completing this setup with CloudFormation is super easy. Here’s the code snippet we created to protect EFS:
|
|
You may notice in the above code snippet we also have defined an IAM role. The AWS Backup service requires access to several other services to perform its activities.
Here’s an example of an IAM Role - again deployed via CloudFormation:
|
|
Pricing
So how much does this cost? If you’re using AWS Backup for EBS, RDS, DynamoDB or the Storage Gateway, there are no additional charges for AWS Backup. You still pay standard snapshot pricing for these backups.
Since EFS does not natively support snapshots using AWS Backup, additional charges will apply.