Launching an RDS Instance on AWS
Follow these steps to create and launch an RDS instance on AWS:
🌍 Step 1: Log in & Open RDS
🔹 Go to AWS Console and sign in.
🔹 In the Search Bar, type RDS and click on it.
🛠️ Step 2: Create a New RDS Database Instance
🔹 Click Create Database.
🔹 Choose Standard create (for manual configuration).
🔹 Under Engine options, select:
- ✅ Amazon Aurora (For high-performance managed DB)
- ✅ MySQL (Popular for web apps)
- ✅ PostgreSQL (Feature-rich, great for analytics)
- ✅ MariaDB / Oracle / SQL Server (Based on your needs)
🔹 Choose Free Tier (for cost-saving, available with MySQL & PostgreSQL).
🔢 Step 3: Configure Database Settings
🔹 DB Instance Identifier → Give a unique name (e.g., MyFirstRDS).
🔹 Credentials → Set a Master username & password (e.g., admin).
🔹 DB Instance Class → Select t3.micro (for Free Tier).
🔹 Storage → Keep default 20GB SSD (scalable).
📌 For production, enable Multi-AZ deployment for high availability!
🌐 Step 4: Network & Security Configuration
🔹 VPC → Select MyVPC (or Default).
🔹 Subnet Group → Keep default or create a new one.
🔹 Public Access → Choose Yes (to connect from anywhere) or No (for private DB).
🔹 Security Group →
- If public: Allow Inbound Rule for 3306 (MySQL) or 5432 (PostgreSQL).
- If private: Keep inside VPC for EC2 access only.
🔹 Database Port → Default 3306 (MySQL) or 5432 (PostgreSQL).
📜 Step 5: Additional Configurations
🔹 Backup → Enable automated backups (set retention days).
🔹 Monitoring → Enable enhanced monitoring (for deeper insights).
🔹 Encryption → Use AWS KMS encryption (optional).
🔹 Performance Insights → Enable for advanced performance tracking.
🔹 Maintenance → Enable auto minor version updates.
🔹 Click Create Database 🎉
✅ Step 6: Connect to Your RDS Database
💡 Once your RDS instance is ready, connect using MySQL/PostgreSQL clients!
🔗 Option 1: Connect from Local Machine
1️⃣ Go to RDS Dashboard → Click on your DB Instance.
2️⃣ Copy the Endpoint (e.g., myfirstdb.abcdefgh.region.rds.amazonaws.com).
3️⃣ Use a MySQL or PostgreSQL client:
mysql -h myfirstdb.abcdefgh.region.rds.amazonaws.com -P 3306 -u admin -p
4️⃣ Enter your DB password and start querying!
🔗 Option 2: Connect from EC2 (Recommended for Private RDS)
1️⃣ Launch an EC2 instance inside the same VPC & Subnet.
2️⃣ Install the database client (for MySQL):
sudo yum install mysql -y
3️⃣ Connect to RDS:
mysql -h myfirstdb.abcdefgh.region.rds.amazonaws.com -P 3306 -u admin -p
📌 Ensure EC2 Security Group allows outbound traffic to RDS!
🎯 Final Check: RDS Setup is Ready!🎉 You’ve successfully set up Amazon RDS with:
✔️ Fully managed MySQL/PostgreSQL instance
✔️ VPC-based networking for security
✔️ Automated backups & monitoring
✔️ Easy connectivity from EC2 or local machine