DevOps(Day-44): Relational Database Service in AWS
SPEED1X
TABLE OF CONTENTS
Amazon RDS
Amazon Relational Database Service (Amazon RDS) is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud.
Task : Creating a Database
Create a Free tier RDS instance of MySQL
Navigate to the RDS section in the AWS management console and click to Create a database.
Select the Engine option which is the type of database to setup. We will select MySQL as per our task.
Select free-tier as the template.
Set up the DB credentials.
select the db size.
Select the EC2 Compute connect as we are going to access our database from EC2.
Choose the VPC that you have created already while spinning EC2 instance.
Use Password authentication to access the database.
Now the new database is spun up.
Create an EC2 instance
- An instance is created and attached to the database in the above step.
Create an IAM role with RDS access
Create a role in IAM.
Select the EC2 option.
Add RDS full access to the group.
Provide the role name and create the role now.
Assign the role to EC2 so that your EC2 Instance can connect with RDS
Navigate to your EC2 instance security settings and modify the IAM role.
Choose your created role to assign to EC2
Once the RDS instance is up and running, get the credentials and connect your EC2 instance using a MySQL client.
Now navigate to your database and make note of Endpoint that is needed to connect RDS to EC2.
Install MySQL client on EC2.
Database will be using 3306 port which you can open in the inbound rule of Instance.
Use the below command to connect to the RDS. You can see now SQL is connected.
Thanks for reading my article. Have a nice day.
WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes
Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333
Subscribe to my newsletter
Read articles from Biswaraj Sahoo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Biswaraj Sahoo
Biswaraj Sahoo
--AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes Empowering communities via open source and education.