To ensure the usefulness of data backups, testing backups is crucial. Without testing, there may be cases where data cannot be recovered from backups. This can lead to situations where workloads are affected due to the need to restore from backup, but the backup is corrupted or the recovery time (RTO) is exceeded. To avoid this situation, backups need to be tested regularly to ensure recoverability.
In this lab, AWS Lambda is used to automatically test all created backups, ensuring that the recovery process is successful and resources created during testing are then deleted to save costs. Automating this process with trigger notifications will help ensure operation at the lowest cost and operations teams have knowledge about the status of backup and restore.
During the restore testing process, it is important to identify the necessary criteria for successfully restoring data from the backed-up resource. This will depend on many factors such as data source, data type, error tolerance, and many other factors. Organizations and workload owners will be responsible for determining these success criteria.
For example, in this lab, an EC2 instance has been created and is running a simple web application. In this case, the successful recovery criteria is determined by checking whether the application is running on the restored resource. If any critical application files are missing on the restored resource, the health check will fail, indicating there is an issue with the backup.
Within the scope of this lab, we will simulate the action that AWS Backup performs when creating a backup of the data source. First, we will create an on-demand backup to test whether the backup is successful. When the backup is complete, a notification will be sent to report the completion of the backup and the Lambda function will be triggered. The Lambda function will make API calls to start the restore process from the backup. This ensures the accuracy of the backup. After the restore process is complete, another notification will be sent to confirm this and the Lambda function will be called again to clean up the newly created resources during the restore process. When the cleanup process is complete, a final notification will be sent to confirm the cleanup.
Access AWS Management Console:

In the RESOURCE TYPE section, select EC2, then paste the Instance ID from the Output section of the CloudFormation Stack.


In Jobs, select Backup jobs, and wait until the status changes to Completed

Click on Backup jobs ID to view details.

Check email to confirm notifications.

Check email related to Restore Test Status.

View Restore jobs information, select Restore jobs ID.

View Restore jobs information, select Restore jobs ID.

Return to AWS Management Console:

In the CloudWatch interface:
/aws/lambda/RestoreTestFunction-<YOUR CLOUDFORMATION STACK NAME>)
In the Log groups interface:


By completing the above steps, you have successfully deployed AWS BACKUP FOR THE SYSTEM.