Scenario 2: Take Scheduled EBS Snapshots
You can run CloudWatch Events rules according to a schedule. In this scenario, you create a snapshot of an existing Amazon Elastic Block Store (Amazon EBS) volume on a schedule. You can choose a fixed rate to create a snapshot every few minutes or use a cron expression to specify that the snapshot is made at a specific time of day. For more information about working with Amazon EBS snapshots, see Amazon EBS Snapshots in the Amazon EC2 User Guide for Linux Instances.
Creating rules with built-in targets is supported only in the AWS Management Console.
Step 1: Create an Amazon CloudWatch Events Rule
To create a CloudWatch Events rule
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.
In the navigation pane, choose Events.
Choose Create rule, and then under Event selector, choose Schedule.
Do one of the following:
To create a snapshot in time intervals, choose Fixed rate of, enter the number of minutes (for example, 5) in the field, and then choose minutes from the list.
To create a snapshot at a specific time of day, choose Cron expression, and enter a cron expression (for example, 0/5 * * * ? *) in the field. For more information about using cron expressions, see Schedule Expressions for Rules.
Under Targets, choose Add target.
In the Select target type list, choose Built-in-target, and in the Action list, choose Create a snapshot of an EBS volume.
In the Volume ID drop-down list, enter the ID of the EBS volume that you want to create a snapshot of.
Choose Configure details. On the Configure rule details screen, in the Name field, type a name for the rule.
In the Description field, enter a brief description for your rule, for example, Create EBS snapshot.
If you're satisfied with the rule, choose Create rule.
Step 2: Test Your Amazon CloudWatch Events Rule
You can test your rule by viewing the Amazon EC2 console after the Amazon EBS snapshot has been taken.
To test your CloudWatch Events rule
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, under Elastic Block Store, choose Snapshots.
In the list of snapshots, verify that your snapshot appears.