0
0
AWScloud~30 mins

Launching an RDS instance in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Launching an RDS instance
📖 Scenario: You are setting up a simple database for a small web application. You want to launch an Amazon RDS instance to store your app's data securely and reliably.
🎯 Goal: Create an AWS CloudFormation template that launches a basic Amazon RDS instance with the specified settings.
📋 What You'll Learn
Use AWS CloudFormation YAML syntax
Create an RDS DB instance resource
Specify DB instance class, engine, and allocated storage
Set master username and password parameters
Add a DB subnet group referencing two subnets
Ensure the DB instance is publicly accessible
💡 Why This Matters
🌍 Real World
Launching an RDS instance is a common task when setting up backend databases for web applications or services in AWS.
💼 Career
Cloud architects and DevOps engineers often write CloudFormation templates to automate infrastructure deployment, including databases like RDS.
Progress0 / 4 steps
1
Create the CloudFormation template skeleton
Start by creating a CloudFormation template with the AWSTemplateFormatVersion set to '2010-09-09' and an empty Resources section.
AWS
Need a hint?

CloudFormation templates start with AWSTemplateFormatVersion and have a Resources section.

2
Add parameters for DB credentials
Add two parameters named DBUsername and DBPassword under Parameters. Set DBUsername as a string with default admin. Set DBPassword as a string with NoEcho true to hide the password.
AWS
Need a hint?

Parameters let you input values when launching the stack. Use NoEcho: true to keep passwords hidden.

3
Add a DB subnet group resource
Add a resource named DBSubnetGroup of type AWS::RDS::DBSubnetGroup. Set its DBSubnetGroupDescription to 'Subnet group for RDS' and SubnetIds to a list containing subnet-12345678 and subnet-87654321.
AWS
Need a hint?

DB subnet groups tell RDS which subnets to use for the database.

4
Add the RDS DB instance resource
Add a resource named MyDBInstance of type AWS::RDS::DBInstance. Set its DBInstanceClass to db.t3.micro, Engine to mysql, AllocatedStorage to 20, MasterUsername to !Ref DBUsername, MasterUserPassword to !Ref DBPassword, DBSubnetGroupName to !Ref DBSubnetGroup, and PubliclyAccessible to true.
AWS
Need a hint?

This resource launches the actual RDS database instance with your settings.