๐ฉ๏ธ Day 27 of #90DaysOfCloud โ Deploying a Managed MariaDB Database with AWS RDS

Table of contents
- ๐ What Is AWS RDS?
- ๐ง Todayโs Focus: Deploying MariaDB on RDS
- ๐งฐ Tools & Services Used:
- ๐ช Step-by-Step RDS Setup (MariaDB)
- ๐ Step 7: Connect to RDS from EC2
- ๐ Step 8: Secure Access
- ๐ง Why Use RDS Over EC2-Hosted DB?
- ๐ธ Useful Screenshots to Include (Add in your blog):
- โ Best Practices
- ๐ Whatโs Next?
- ๐ Summary

Today we explored one of AWSโs most powerful and time-saving services โ Amazon RDS (Relational Database Service). By the end of the session, we deployed a MariaDB instance, connected from EC2 and a local client, and understood key features like backups, monitoring, and snapshots.
๐ What Is AWS RDS?
Amazon RDS is a fully managed relational database service that allows developers to set up, operate, and scale a relational database in the cloud with minimal management effort.
โ Key Benefits:
Automated backups and patching
Built-in high availability with Multi-AZ
Easy scaling (vertically or via read replicas)
Integrated monitoring via CloudWatch
Supports multiple engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora
๐ง Todayโs Focus: Deploying MariaDB on RDS
๐งฐ Tools & Services Used:
AWS RDS (MariaDB)
Amazon EC2 (Linux for testing connectivity)
AWS VPC, Security Groups
๐ช Step-by-Step RDS Setup (MariaDB)
โ Step 1: Navigate to RDS
Go to AWS Console โ Services โ RDS
Click Create Database
โ Step 2: Choose Engine
Select MariaDB
Engine version: Choose latest stable (e.g., MariaDB 10.6+)
โ Step 3: Set Up Database
DB Identifier:
cloud-mariadb-db
Master Username:
admin
Master Password:
StrongPassword123
โ ๏ธ Save these credentials safely.
โ Step 4: Instance Settings
DB instance class:
db.t3.micro
(Free tier)Storage: General Purpose (SSD), 20 GiB
Enable autoscaling: Optional
โ Step 5: Connectivity
VPC: Choose default or custom
Subnet group: Default
Public access: Yes (for now; restrict in prod)
VPC security group: Create new or use existing
โ Allow port 3306 for:
Your IP (if connecting locally)
EC2 security group (for internal access)
โ Step 6: Additional Configurations
Backup: Enable automated backups (7 days)
Monitoring: Enable Enhanced Monitoring (optional)
Maintenance: Default settings
Click Create Database and wait 5โ10 mins โณ
๐ Step 7: Connect to RDS from EC2
bashCopyEdit# From EC2 instance (Amazon Linux)
sudo yum install mariadb -y
# Connect using the endpoint provided
mysql -h <RDS-ENDPOINT> -P 3306 -u admin -p
Youโll be prompted for the password โ StrongPassword123
โ Once connected:
sqlCopyEditCREATE DATABASE test_db;
USE test_db;
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50));
INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob');
SELECT * FROM users;
๐ Step 8: Secure Access
Remove public access if not needed
Use IAM Database Authentication (optional)
Enable Multi-AZ for production setups
๐ง Why Use RDS Over EC2-Hosted DB?
Feature | EC2 | RDS |
Manual backups | โ | โ (automated in RDS) |
Patching | โ | โ |
High availability | Manual | Built-in (Multi-AZ) |
Monitoring | Manual setup | CloudWatch integrated |
Scaling | Complex | Few clicks |
๐ธ Useful Screenshots to Include (Add in your blog):
โ Best Practices
Use parameter groups for tuning
Enable CloudWatch alarms
Rotate passwords securely
Use RDS Snapshots before risky operations
Disable public access for production
๐ Whatโs Next?
Tomorrow is Day 28, and weโll begin an exciting hands-on project:
๐ฏ Designing and Deploying a 3-Tier Web Architecture on AWS
Weโll integrate:
Frontend (Web/App Layer)
Backend (Logic Layer)
Database (Data Layer โ RDS)
Using EC2, ALB, Auto Scaling Groups, and RDS โ to simulate real-world, scalable cloud architecture.
๐ Summary
In todayโs lab, I learned how to:
Deploy a fully managed MariaDB instance using Amazon RDS
Connect to it securely from EC2
Run queries, create tables, and manage databases
Compare RDS vs EC2-managed DBs
Set up automated backups and monitoring
Subscribe to my newsletter
Read articles from Pratik Das directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
