What is AWS RDS?
Amazon RDS is a Relational Database Cloud Service.
Amazon RDS creates multiple instances for high availability and failovers.
Amazon RDS supports PostgreSQL, MySQL, Maria DB, Oracle, SQL Server, and Amazon Aurora.
Note
- RDS should always be configure inside a private subnet as because its a Database.
- Backup retention is very easy in case of RDS.
- RDS has an endpoint through which we can able to connect it with mysql workbench.
QS)-Now the question is how to connect AWS RDS which is present inside a private subnet of VPC from our local computer application [ MYSQL Workbench ]?
- Ans:- One of the way is through OpenVpn setup. Once we able to setup an OpenVpn network , We can associate Host name ,port,Username,Password of RDS to our MYSQL workbench and able to connect.
LAB WORK
RDS setup
- Create a VPC. [CIDR range :- 10.0.0.0/16]
- Create two Private subnet with subnet association inside that VPC [ Atleast 2AZ] .Ipv4 CIDR:- 10.0.2.0/24 and 10.0.4.0/24
- Create subnet groups and attach all subnet present inside that VPC.
- Launch a RDS inside those private subnet.
-Create username and password.
-Copy the endpoints and attach it in Mysql workbench host name.
OpenVpn Setup
- Create an Internet Gateway attach it with that VPC.
- Create One public subnet with subnet association and routes table associated with internet gateway.
- Deploy an OpenVpn in the Public subnet and connect it through xshell. -launch configuration.
- Search for Openvpn.
- Select OpenVpn Access server and launch it.
- Install OpenVpn ,set the username and password and get the admin and client url for further use.
-Change the password.
- Copy and paste the admin and client url for further use.
-Go to openvpn application and paste client url.
-Enter your username and password and connect.
- Download and install MySQL Workbench.
- Open MySQL Workbench, and choose the ⊕ sign beside MySQL Connections to set up a new connection.
- In the Setup New Connection dialog box, enter a suitable name for your connection.
- In the Parameters section, enter the following details:
- Host name: Enter the RDS endpoint
- Port: Enter Port the number
- Username: Enter the master user
- Choose Test Connection.
- In the popup that appears, enter the password that you configured when you created the DB instance, and then choose OK.
- After testing your connection, from the Setup new connection dialog box, choose OK to save the connection. -Now You have successfully connected to Aws rds.
Top comments (0)