Day 44: Relational Database Service in AWS ????

Day 44: Relational Database Service in AWS ????

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-01

1. Create an EC2 instance

You can go to the Amazon EC2 console.

Click "Launch Instance".

Choose an AMI.

Select an instance type, such as t2.micro.

Choose a VPC and subnet.

No alt text provided for this image


No alt text provided for this image

Set up security group rules so incoming traffic is permitted on the correct port for the type of database you're using (e.g., port 3306 for MySQL).

No alt text provided for this image

Launch the instance.

No alt text provided for this image

2. Create a Free tier RDS instance of MySQL

Visit the Amazon RDS interface. the "Create database" button.

No alt text provided for this image

Make "MySQL" your engine type choice.

No alt text provided for this image

For the "Database instance class" template, select the "Free tier" option.

No alt text provided for this image

Give the "Database instance identification" a special name.

The database's "Master username" and "Master password" should be set.

No alt text provided for this image

Configure the instance's "Virtual Private Cloud (VPC)" and "Subnet group" settings.

Maintain the default values for the other parameters.

No alt text provided for this image
No alt text provided for this image

Click on the ec2 instance

No alt text provided for this image
No alt text provided for this image

Choose the VPC security group

No alt text provided for this image
No alt text provided for this image

Click "Create Database" to start the instance creation.

No alt text provided for this image

and your Db-Instance is created.

No alt text provided for this image

3. Create an IAM role with RDS access.

Go to the IAM console. Click "Roles". Click "Create a role".

No alt text provided for this image

Choose the "AWS service" option.

Choose "Allows EC2 instances to call AWS services on your behalf."

No alt text provided for this image

Attach the "AmazonRDSFullAccess" policy.

No alt text provided for this image

Give the role a unique name.

No alt text provided for this image

Choose "Create role" from the menu.

No alt text provided for this image

Your role is created

No alt text provided for this image

4. Assign the role to EC2 so that your EC2 Instance can connect with RDS

Go to the EC2 console.

Choose the newly formed instance.

Next, select "Attach/Replace IAM Role" under "Actions," "Instance Settings," and so forth.

No alt text provided for this image

Choose the newly formed IAM role.

To update an IAM role, click it.

No alt text provided for this image

5. Once the RDS instance is up and running, get the credentials and connect your EC2 instance using a MySQL client.

Go over to the RDS console.

Choose the newly formed instance.

After selecting "Configuration," make a note of the endpoint address.

No alt text provided for this image

Make a note of the login and password by clicking "Security."

No alt text provided for this image

Using a terminal or remote access tool, SSH into your EC2 instance.

No alt text provided for this image

Install the "mysql" MySQL client.

No alt text provided for this image
No alt text provided for this image

Using the MySQL client and the endpoint address, username, and password, connect to the RDS instance:

mysql -h <endpoint address> -P <port.no> -u <username> -p        

When prompted, enter the password and hit enter.

You need to now be linked to the RDS instance's MySQL database.

No alt text provided for this image
No alt text provided for this image

I'm confident that this will aid in your education. If this post even has a small impact on you, please hit the "like" button or share it with your friends.????

要查看或添加评论,请登录

Vinay Kumar的更多文章

  • DevOps Project - 4 ????

    DevOps Project - 4 ????

    Project Description The project aims to deploy a web application using Docker Swarm, a container orchestration tool…

    7 条评论
  • DevOps Project 3 ????

    DevOps Project 3 ????

    Project Description The project involves hosting a static website using an AWS S3 bucket. Amazon S3 is an object…

    3 条评论
  • DevOps Project -2 ????

    DevOps Project -2 ????

    Project Description The project is about automating the deployment process of a web application using Jenkins and its…

  • Day 80: DevOps Project 1 ????

    Day 80: DevOps Project 1 ????

    Project Description The project aims to automate the building, testing, and deployment process of a web application…

    2 条评论
  • Day 73 - Setup Grafana on AWS EC2 Instance ????

    Day 73 - Setup Grafana on AWS EC2 Instance ????

    Task: Set up grafana in your local environment on AWS EC2. Go to the AWS console and Launch an EC2 instance To enable…

  • Day 72 - Grafana ????

    Day 72 - Grafana ????

    What is Grafana? No matter where your metrics are kept, Grafana is an open-source data visualization and monitoring…

    4 条评论
  • Day71 - Terraform Interview Questions ????

    Day71 - Terraform Interview Questions ????

    1. What is Terraform and how it is different from other IaaC tools? HashiCorp's Terraform is an Infrastructure as Code…

  • Day 70 - Terraform Modules ????

    Day 70 - Terraform Modules ????

    Modules are containers for multiple resources that are used together. A module consists of a collection of .

    4 条评论
  • Day 69 - Meta-Arguments in Terraform ???

    Day 69 - Meta-Arguments in Terraform ???

    When you define a resource block in Terraform, by default, this specifies one resource that will be created. To manage…

    4 条评论
  • Day 65 - Terraform Resources ????

    Day 65 - Terraform Resources ????

    Understanding Terraform Resources A resource in Terraform represents a component of your infrastructure, such as a…

    2 条评论

社区洞察

其他会员也浏览了