0
0
AWScloud~30 mins

RDS backup and snapshots in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
RDS Backup and Snapshots Setup
📖 Scenario: You are managing a database for a small online store. To protect the data, you want to set up automatic backups and manual snapshots for your Amazon RDS instance.
🎯 Goal: Set up an Amazon RDS instance with automated backups enabled and create a manual snapshot of the database.
📋 What You'll Learn
Create an RDS instance with automated backups enabled
Set the backup retention period to 7 days
Create a manual snapshot of the RDS instance
💡 Why This Matters
🌍 Real World
Backing up databases is critical for data safety. Automated backups help recover from accidental data loss, and manual snapshots allow point-in-time recovery.
💼 Career
Cloud engineers and DevOps professionals often configure RDS backups and snapshots to ensure database reliability and disaster recovery.
Progress0 / 4 steps
1
Create an RDS instance with automated backups enabled
Write an AWS CloudFormation resource named MyDBInstance of type AWS::RDS::DBInstance with the following properties: DBInstanceIdentifier set to mydbinstance, Engine set to mysql, MasterUsername set to admin, MasterUserPassword set to password123, and BackupRetentionPeriod set to 7 to enable automated backups for 7 days.
AWS
Need a hint?

Use the BackupRetentionPeriod property to enable automated backups and set the retention period.

2
Add a DB subnet group for the RDS instance
Add a resource named MyDBSubnetGroup of type AWS::RDS::DBSubnetGroup with DBSubnetGroupDescription set to Subnet group for mydbinstance and SubnetIds set to a list containing subnet-12345 and subnet-67890. Then, update the MyDBInstance resource to include the DBSubnetGroupName property referencing MyDBSubnetGroup.
AWS
Need a hint?

Use AWS::RDS::DBSubnetGroup to define the subnet group and reference it in the DB instance.

3
Create a manual snapshot of the RDS instance
Add a resource named MyDBSnapshot of type AWS::RDS::DBSnapshot with DBInstanceIdentifier set to mydbinstance and DBSnapshotIdentifier set to mydbsnapshot.
AWS
Need a hint?

Use AWS::RDS::DBSnapshot to create a manual snapshot of the RDS instance.

4
Add deletion policy to retain the snapshot on stack deletion
Add a DeletionPolicy attribute with value Retain to the MyDBSnapshot resource to keep the snapshot even if the CloudFormation stack is deleted.
AWS
Need a hint?

Use the DeletionPolicy attribute at the resource level to keep the snapshot after stack deletion.