π§ͺ Hands-On: Amazon RDS MySQL Database
In this lab, you'll create your first RDS MySQL database and learn to:
ποΈ Create and configure an RDS database
π Set up authentication and networking
πΈ Create and restore a database snapshot
ποΈ Clean up your AWS resources
By the end, you'll know the basics of deploying and managing a relational database on RDS.
π The Scenario
You're deploying a web app that needs a database for customer and application data.
Instead of installing and managing MySQL on EC2 yourself, you use Amazon RDS β AWS handles the infrastructure, backups, patching, and maintenance for you.
Let's build it! π
β οΈ Cost Warning
Running an RDS database can incur charges if your Free Tier has expired or you leave it running after the lab.
π‘ Delete all resources when you're done to avoid unnecessary costs.
π Step 1: Open the Amazon RDS Console
From the AWS Management Console:
Search for RDS.
Open the Amazon RDS Console.
From the navigation pane on the left, click Databases.
Click Create database.

π Step 2: Choose the Database Creation Method
You'll see two options:
β‘Express configuration - Easy Create
βοΈ Full Configuration - Standard Create

β Choose Full Configuration β it exposes the real-world settings you'll use in production.
π Step 3: Select the Database Engine
RDS supports several engines:
β‘ Aurora (MySQL compatible)
β‘ Aurora (PostgreSQL compatible)
π¬ MySQL
π PostgreSQL
π¦ MariaDB
πΆ Oracle
πͺ SQL Server
π¦ IBM Db2
β Select MySQL β popular, beginner-friendly, fully supported.

π Step 4: Choose the Database Template

π’ Production β Multi-AZ for high availability, fault tolerance, disaster recovery
π§ͺ Dev/Test
π Free Tier / Sandbox β single instance, single AZ, low cost
β Select Free Tier or sandbox for this lab.

π Step 6: Configure Settings
Engine Version: leave default (AWS recommends a stable version)

DB Instance Identifier: leave default
Master Username: leave default

Credential Management β two options:
π Self-managed password
π AWS Secrets Manager (auto-stores and rotates passwords)
β Choose Self-managed for simplicity in this lab.

Enter and confirm a strong password, e.g. T8!mK#92Lp%X. β οΈ Never use weak passwords.

Leave Password Authentication enabled.

RDS also supports IAM Database Authentication for IAM users/roles to connect directly.

π Step 7: Choose the Instance Configuration
Under DB Instance Class, keep the default Free Tier option
(db.t4g.micro or db.t3.micro β either works).

π Step 8: Configure Storage
Leave the default storage size: β 20 GB

Expand Additional Storage Configuration.
You'll notice an option called: β Storage Autoscaling

π‘ Storage Autoscaling grows capacity automatically as your database fills up β e.g. 20 GB β 50 GB β 100 GB β up to 1,000 GB β so your app never fails from running out of space.
π Step 9: Configure Connectivity
Under Connectivity, configure the following:
Don't connect to an EC2 compute resource
VPC: Default
Subnet Group: Default

For Public Access, choose: β Yes

π‘ Why Public Access?
Selecting Yes gives the database a public endpoint, making it easier to connect to during this lab.
π Step 10: Create a Security Group
VPC Security Group: Create New
Name it:
demo-rdsLeave the rest default

π Step 11: Database Port
Leave the default port: 3306 β MySQL's standard port.

π‘ Why Port 3306?
3306 is the default port used by MySQL for database connections.
π Step 12: Monitoring
Leave: β Standard Monitoring

RDS also offers Enhanced Monitoring, CloudWatch Metrics, and Log Exports if you need more.

π Step 13: Create Database
Review your settings, then click β Create Database

β³ Step 14: Wait for the Database to be Created
RDS takes a few minutes to provision the database. AWS is setting up all the required infrastructure behind the scenes.

Be patient while AWS prepares all of the required infrastructure.
π Step 15: Explore Your Database

Once status shows Available, click the database name to see:
π Availability Zone
π Endpoint
π Port Number
βοΈ Configuration
πΎ Storage
π Security Settings
π‘ The Endpoint + Port (3306) are what your application uses to connect.
π Review the Security Group
Open the attached Security Group β Inbound Rules tab. You'll see traffic allowed on port 3306

π Explore Monitoring
Open the Monitoring tab to see built-in metrics: π CPU Utilization, πΎ Storage, π Database Activity, π Login Events and more.
π‘ Without RDS, you'd have to install and configure all this monitoring yourself β one of the biggest wins of a managed service.
πΈ Step 16: Create a Database Snapshot
Database snapshots allow you to create a backup of your database at a specific point in time.
From the Actions menu, select: Take Snapshot

Give the snapshot a name, for example:
demo-snapshot

Click: Take Snapshot

β οΈ If AWS says the database is still backing up, wait for status Available and try again.

π Step 17: Restore from a Snapshot
Once the snapshot is Available:
Select it β Actions β Restore Snapshot

π‘ Restoring creates a new database from the backup. For this lab, review the options, then cancel the restore.
π Step 18: Copy a Snapshot
Copy Snapshot lets you back up a snapshot to another AWS Region β useful for disaster recovery and business continuity.
π€ Step 19: Share a Snapshot
Share Snapshot lets another AWS account restore a database from your backup β handy for collaboration and migration.
π Congratulations!
You've:
β Created an RDS database
β Explored its configuration
β Reviewed monitoring
β Created, restored, copied, and shared a snapshot
You've now seen the core value of a managed database service: monitoring, backups, snapshots, and maintenance β all handled for you.
π§Ή Clean Up Your Resources
To avoid unexpected charges, let's delete the resources we created.
ποΈ Delete the Snapshot
Snapshots β select yours β Actions β Delete β confirm


ποΈ Delete the Database
Databases β select yours β Actions β Delete

Before deleting:
β Do not create a final snapshot.
β Do not retain automated backups.
Check the confirmation box acknowledging that the database and backups will be permanently deleted.
Finally, type: delete me

Click: β Delete
