Home » Creating an RDS Instance

Creating an RDS Instance

by Online Tutorials Library

Creating an RDS Instance

Step 1: Creating an RDS instance.

  • Click on the RDS service under Database.

Creating an RDS Instance

  • Click on the Dashboard appearing on the left side of the console, then click on the Create Database button.

Creating an RDS Instance

  • Choose the MySQL database.

Creating an RDS Instance

  • Check the box of “Only enable options eligible for RDS Free Usage Tier“, and then click on the Next.

Creating an RDS Instance

  • Specify DB details. Keep all the details as default. Enter the DB instance identifier which would be unique for all DB instances owned by your AWS account.

Creating an RDS Instance

  • Configure advanced settings of your RDS instance. Keep all the settings as default except that you need to enter the database name.

Creating an RDS Instance

  • Click on the Create Database button.

Creating an RDS Instance

The above screen shows that your DB instance has been created.

Step 2: Creating an EC2 instance.

  • Click on the EC2 service.
  • Launch an instance.
  • Choose an Amazon Machine Image (AMI).

Creating an RDS Instance

  • Choose an Instance type.

Creating an RDS Instance

  • Configure Instance details. Keep all the details as default.

Creating an RDS Instance

  • (Optional) Add EBS Volume.
  • Add Tags.

Creating an RDS Instance

  • Configure Security group. Suppose I create a new group whose name is WebServer.

Creating an RDS Instance

  • Click on the Launch button.

Step 3: Installing PHP.

  • Open the Putty.
  • Add the hostname. i.e., [email protected]_address.
  • Run the command sudo su to reach the root level.

Creating an RDS Instance

  • Install the PHP and server by running the command yum install httpd php php-mysql -y.

Creating an RDS Instance

The above screen shows that the installation of php has been completed.

  • Run the command yum update -y to update the EC2 instance.

Creating an RDS Instance

  • Run the command service httpd start to start the server.

Creating an RDS Instance

  • Put the php information to the index.html fileby running the command echo ?<?php phpinfo();?>? > /var/www/html/index.php.

Creating an RDS Instance

  • Paste the public IP address of an ec2 instance to the clipboard of a web browser.

Creating an RDS Instance

Step 4: Connect an EC2 instance to an RDS instance.

  • Create a connect.php file.

Creating an RDS Instance

  • Now, copy the IP address of an ec2 instance with the forward slash, and then connect.php, i.e., 54.210.204.58/connect.php.

Creating an RDS Instance

The above screen shows that an EC2 instance is not connected to an RDS instance because of the following reasons:

  • Both RDS instance and EC2 instance contains different security groups.
  • Update the hostname with the end point of RDS instance.

Creating an RDS Instance

  • Click on the inbound rule, and then Edit the rule. This rule is used to achieve communication between two different security groups.

Creating an RDS Instance

  • The screen shown below shows that the hostname has been updated with the end point of RDS instance.

Creating an RDS Instance

  • Now, copy the public IP address of EC2 instance with the forward slash, and then connect.php, i.e., 54.210.204.58/connect.php.

Creating an RDS Instance

The above screen shows that an EC2 instance has been connected to your RDS instance.


Next TopicAWS DynamoDB

You may also like