Beginner's Guide: Setting Up MySQL RDS on AWS Cloud

I'm Zin Lin Htet. Who love to learn and share about Linux, Cloud, Docker and K8s. Currently working as a DevOps Engineer at one of the famous Fintech Company in Myanmar.
Search for a command to run...

I'm Zin Lin Htet. Who love to learn and share about Linux, Cloud, Docker and K8s. Currently working as a DevOps Engineer at one of the famous Fintech Company in Myanmar.
No comments yet. Be the first to comment.
Today, I want to introduce Dozzle, a web-based tool for viewing container logs in real time. In this tutorial, I utilized AWS Lightsail with Ubuntu to host the Docker engine. I used a Cloudflare domai

Building a secure, scalable containerized application on AWS using ECS Fargate, RDS PostgreSQL, and GitHub Actions CI/CD

Today, I want to explain the difference between a task role and an execution role in AWS ECS. Yesterday, I set up AWS ECS for a UAT environment and defined both roles. Let me clarify what a task role

Today, we will learn how to set up a backend API container with PostgreSQL on Kubernetes. In this tutorial, you will learn how to write a multi-stage Docker file, install the MetalLB load balancer, set up the Rancher local path provisioner for storag...

Today I would like to share how to configure GitHub Actions OIDC with AWS. In this lab, you will learn why we use OIDC for AWS. Traditionally, we use an AWS Access Key ID and Secret Access Key as the authentication method to communicate with AWS serv...

Today I want to share how to setup MySQL RDS in AWS Infra step by step. In this scenario you can see how to configure and setup RDS with best practice ways and connect RDS from DBeaver via using bastion host. Let’s check it out guys.
Here is the step by step procedure.
| Phases | Steps |
| Phase 1 | Define Security group for bastion host and RDS |
| Phase 2 | Create database subnet and parameter group |
| Phase 3 | Setup RDS |
| Phase 4 | Connect from DBeaver via using bastion host |
| Pahse 5 | Delete RDS and other resources |
I create two security group one for database and last for bastion host. can see I allow db connection from anywhere. In real world use case you don’t need to define inbound rule like that. For production or uat environment you should define db inbound rule is coming from specific backend look like EKS cluster security group, ECS security group, EC2 security group or etc. Don’t define anywhere ipv4.



Create Bastion host security group. Allow SSH connection from anywhere. But in real world you should define specific ip for who are allow to connect bastion host.


I edit db inbound rule form anywhere to allow only from bastion host.


In default setting there is no subnet groups and prameter groups. You want to define RDS subnet is exactly locate in private subent you can create and define subnet in this place. I create parameter group because I want to customize database parameter group value in feature. At that time if you don’t create parameter group system will automatically define parameter group base upon your db engine but this system create parameter group is can’t edit prarmeter value. So I would like to suggest you should use customized parameter group.







I only use free tier RDS and engine is MySQL Community edition with private access.







In this place you can see enable storage autoscaling feature is on. If you don’t care about storage you can unchek this setting. If you need to care about storage you can define storage ammount.


I define db parameter group with my own db parameter group which are already created.




You should turn on enable deletion protection. This function is helpful and svae you in one day. Think you accidentally delete the database but your database is not delete because of this function.


After database is created system is automatically snapshoot your database.

SSH into my bastion host and I test using telenet command for my bastion can connect to database. You can see my bastion can connect to RDS. Thanks god my security groups are working properly and well define.
telnet [ your database endpoint ] 3306


I put username and password. I already define in RDS setting. And then click SSH for bastion host.

I define my bastion host public ip and username. I use private key authentication method.












I hope you will perfectly know how to setup and configure about AWS RDS. If you have any issue or doubt please let me know. Don’t forget to delete resources after you tested. Happy learning and see you at the next articale. If my article is helpful for you please like and share. I would really appreciate your support.