0% found this document useful (0 votes)
28 views5 pages

Lab 6

Uploaded by

zeusauce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views5 pages

Lab 6

Uploaded by

zeusauce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment No.

– 6
Date of Performance:
Date of Submission:

Program Execution/
formation/ Timely
Viva Experiment
correction/ Submission Sign with Date
(03) Total (10)
ethical practices (01)
(06)

Experiment No. 6
Implement Database as a Service on SQL/NOSQL databases like AWS RDS

6.1 Aim: To demonstrate and implement Database as a Service using AWS.

6.2 Course Outcome: Implement various cloud computing service models and implement them to
solve the given Problems.

6.3 Learning Objectives: To Create a MySQL DB instance using Amazon Relational Database
Service (Amazon RDS)

6.4 Requirement: Amazon Web Service

6.5 Related Theory:


Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up,
operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for
an industry-standard relational database and manages common database administration tasks.

Amazon RDS provides the following specific advantages over database deployments that aren't fully
managed:
● You can use the database products you are already familiar with: Db2, MariaDB, Microsoft SQL
Server, MySQL, Oracle, and PostgreSQL.
● Amazon RDS manages backups, software patching, automatic failure detection, and recovery.
● You can turn on automated backups, or manually create your own backup snapshots. You can use
these backups to restore a database. The Amazon RDS restore process works reliably and
efficiently.

Skill Based Lab - Cloud Computing (CMLR0507) A.Y. 2024-25


29
● You can get high availability with a primary instance and a synchronous secondary instance that you
can fail over to when problems occur. You can also use read replicas to increase read scaling.
● In addition to the security in your database package, you can help control who can access your RDS
databases. To do so, you can use AWS Identity and Access Management (IAM) to define users and
permissions. You can also help protect your databases by putting them in a virtual private cloud
(VPC).

6.6 Procedure:

Step 1: Create a MySQL DB instance


❖ Sign in to the AWS Management Console and open the Amazon RDS console at
https://console.aws.amazon.com/rds/.
❖ In the upper-right corner of the Amazon RDS console, choose the AWS Region you used for the
EC2 instance previously.
❖ In the navigation pane, choose Databases.
❖ Choose Create database and make sure that Easy create is chosen.on.
❖ In Configuration, choose MySQL.
❖ For DB instance size, choose Free tier.
❖ For DB instance identifier, enter database-test1.
❖ For Master username, enter a name for the master user, or keep the default name.
❖ To use an automatically generated master password for the DB instance, select Auto generate a
password.
❖ To enter your master password, make sure Auto generate a password is cleared, and then enter the
same password in Master password and Confirm password.
❖ To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
❖ Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
❖ (Optional) Open View default settings for Easy create.
❖ Choose Create database.
❖ To view the master username and password for the DB instance, choose View credential details.
❖ You can use the username and password that appears to connect to the DB instance as the master
user.
❖ In the Databases list, choose the name of the new MySQL DB instance to show its details.
❖ The DB instance has a status of Creating until it is ready to use.

Step 2: Connect to a MySQL DB instance

You can use any standard SQL client application to connect to the DB instance. In this example, you
connect to a MySQL DB instance using the mysql command-line client.

❖ Find the endpoint (DNS name) and port number for your DB instance.
❖ Sign in to the AWS Management Console and open the Amazon RDS console at
https://console.aws.amazon.com/rds/.

Skill Based Lab - Cloud Computing (CMLR0507) A.Y. 2024-25


30
❖ In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB instance.
❖ In the navigation pane, choose Databases.
❖ Choose the MySQL DB instance name to display its details.
❖ On the Connectivity & security tab, copy the endpoint. Also, note the port number. You need both
the endpoint and the port number to connect to the DB instance.
❖ Connect to the EC2 instance that you created earlier by following the steps in Connect to your
Linux instance in the Amazon EC2 User Guide.

❖ Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
this, use the following command.
sudo dnf update -y
❖ To install the mysql command-line client from MariaDB on Amazon Linux 2023, run the following
command:
sudo dnf install mariadb105
❖ Connect to the MySQL DB instance. For example, enter the following command. This action lets
you connect to the MySQL DB instance using the MySQL client.
❖ Substitute the DB instance endpoint (DNS name) for endpoint, and substitute the master username
that you used for admin. Provide the master password that you used when prompted for a password.
mysql -h endpoint -P 3306 -u admin -p
❖ Run SQL commands.
For example, the following SQL command shows the current date and time:
SELECT CURRENT_TIMESTAMP;

Skill Based Lab - Cloud Computing (CMLR0507) A.Y. 2024-25


31
6.7 Program and Output:

Skill Based Lab - Cloud Computing (CMLR0507) A.Y. 2024-25


32
6.8Conclusion:
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
……………………………………………………………………………
6.9 Review Questions based on Experiment:

Skill Based Lab - Cloud Computing (CMLR0507) A.Y. 2024-25


33

You might also like