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.
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).
Launch the instance.
2. Create a Free tier RDS instance of MySQL
Visit the Amazon RDS interface. the "Create database" button.
Make "MySQL" your engine type choice.
For the "Database instance class" template, select the "Free tier" option.
Give the "Database instance identification" a special name.
The database's "Master username" and "Master password" should be set.
Configure the instance's "Virtual Private Cloud (VPC)" and "Subnet group" settings.
Maintain the default values for the other parameters.
Click on the ec2 instance
Choose the VPC security group
Click "Create Database" to start the instance creation.
and your Db-Instance is created.
领英推荐
3. Create an IAM role with RDS access.
Go to the IAM console. Click "Roles". Click "Create a role".
Choose the "AWS service" option.
Choose "Allows EC2 instances to call AWS services on your behalf."
Attach the "AmazonRDSFullAccess" policy.
Give the role a unique name.
Choose "Create role" from the menu.
Your role is created
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.
Choose the newly formed IAM role.
To update an IAM role, click it.
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.
Make a note of the login and password by clicking "Security."
Using a terminal or remote access tool, SSH into your EC2 instance.
Install the "mysql" MySQL client.
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.
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.????
Sr SQL Server DBA
2 年Thank you