๐ŸŒฉ๏ธ Day 27 of #90DaysOfCloud โ€” Deploying a Managed MariaDB Database with AWS RDS

Pratik DasPratik Das
3 min read

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?

FeatureEC2RDS
Manual backupsโœ…โŒ (automated in RDS)
PatchingโŒโœ…
High availabilityManualBuilt-in (Multi-AZ)
MonitoringManual setupCloudWatch integrated
ScalingComplexFew 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

0
Subscribe to my newsletter

Read articles from Pratik Das directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pratik Das
Pratik Das