To help improve data protection and recovery, it is a best practice to regularly back up Amazon Elastic Compute Cloud (Amazon EC2) instances using Amazon Elastic Block Store (Amazon EBS) snapshots. Amazon EBS snapshots contain the information needed to restore your data from the time the snapshot was taken to a new Amazon EBS volume. AWS customers can use snapshots to instantiate multiple new volumes, expand the size of a volume, or move volumes across Regions and Availability Zones.

The EBS Snapshot Scheduler is an AWS-provided solution that enables customers to create an automated snapshot schedule for their Amazon EBS volumes in minutes. The solution is easy to deploy and automatically manages snapshot creation and deletion using parameters that you define. For customers who do not have a mechanism for taking regular snapshots, this solution provides an easy way to improve data protection and recoverability. 

This webpage provides best practices for implementing automated backup and recovery actions on resources, as well as an overview of the EBS Snapshot Scheduler design and functionality.  

When running infrastructure on the cloud, automate backups for data recovery whenever possible. Automated actions are more reliable than manual processes, helping to improve data protection and recoverability. For optimal reliability and cost savings, consider these AWS best practices:

  • Carefully consider your snapshot frequency and retention settings before deploying the EBS Snapshot Scheduler to avoid incurring unnecessary EBS snapshot charges.
  • Implement a resource-identification system, such as tags for Amazon EC2 instances. This helps to ensure that automated actions are targeted to the correct resource, and also allows for easier filtering, modification, and troubleshooting according to categories that you define.
  • Grant least-privilege access to individuals or systems that perform automated actions on resources.  

AWS offers a simple solution that allows you to automatically take point-in-time snapshots of your EBS volumes. The diagram below presents the components and functionality you can build using the EBS Snapshot Scheduler implementation guide and accompanying AWS CloudFormation template.

  1. During initial deployment, define the default snapshot and auto-deletion parameters. These values are stored in Amazon DynamoDB, and can be overridden or modified as necessary.
  2. Apply a custom resource tag to Amazon EC2 instances that should receive EBS Snapshot Scheduler actions.
  3. Modify individual instance tags to customize EBS Snapshot Scheduler actions, if necessary.
  4. The solution's recurring AWS Lambda function automatically takes snapshots of EBS volumes on appropriately tagged Amazon EC2 instances.
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy the EBS Snapshot Scheduler using AWS CloudFormation. The CloudFormation template will automatically launch and configure the components necessary to automatically take crash-consistent snapshots of EBS volumes attached to tagged Amazon EC2 instances in all AWS Regions of your account.

Configure multiple snapshot schedules by modifying individual resource tags. The EBS Snapshot Scheduler solution gives you the flexibility to automatically manage multiple schedules as necessary.

What you'll need before starting:

An AWS account: You will need an AWS account to begin provisioning resources. Sign up for AWS.

Skill level: This solution is intended for IT infrastructure and DevOps professionals who have practical experience with automation and architecting on the AWS cloud.

Q: What default snapshot time does the EBS Snapshot Scheduler use?

You can define the default parameters during initial deployment of the solution's AWS CloudFormation template. If you do not specify a default snapshot time and day, the EBS Snapshot Scheduler will take a snapshot at 2330 UTC every day. You can also modify an individual instance's resource tag to specify custom parameters that will override the default settings.

Q: Can I create multiple snapshot schedules for a single instance?

Yes. Deploy the EBS Snapshot Scheduler and then apply multiple custom tags to a single instance. See the implementation guide for detailed instructions.

Q: At what interval(s) can the EBS Snapshot Scheduler take snapshots?

You can create daily schedules for the EBS Snapshot Scheduler, and can configure it to run on specific days of the week or all days.

Q: Can I configure snapshot times in my local time zone?

Yes. You can specify a time zone during initial configuration. If you want to set unique snapshot times for groups of instances in different time zones, you can specify custom parameters in their resource tags.

Q: How much will it cost to run the EBS Snapshot Scheduler?

You are responsible for the cost of the AWS services used while running this reference deployment. The cost depends on the interval of the AWS Lambda function, the amount of space your initial snapshot consumes in Amazon Simple Storage Solution (Amazon S3), and the size of the changed blocks for each incremental snapshot. For full pricing details, see the implementation guide.

Q: Can I deploy the EBS Snapshot Scheduler in any AWS Region?

Customers can deploy the EBS Snapshot Scheduler AWS CloudFormation template only in AWS Regions where AWS Lambda is available. However, once deployed, the solution's Lambda function can apply actions to Amazon EC2 instances in any AWS Region.

Need more resources to get started with AWS? Visit the Getting Started Resource Center to find tutorials, projects and videos to get started with AWS.

Tell us what you think