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
Step 1: Create a Free Tier RDS Instance of MySQL ๐
Open the AWS Management Console ๐ฅ๏ธ.
Navigate to the RDS service ๐.
Click on "Create Database" to launch the RDS wizard ๐ง.
Choose "MySQL" as the database engine ๐ ๏ธ.
Configure your database settings and credentials ๐ก๏ธ.
Click "Create Database" to initiate the RDS instance creation โณ.
Step 2: Create an EC2 Instance ๐
Head to the EC2 dashboard in the AWS Management Console ๐ฅ๏ธ.
Click "Launch Instance" to start the EC2 instance creation wizard ๐ง.
Choose an Amazon Machine Image (AMI) and configure your instance details ๐ ๏ธ.
Select an existing key pair or create a new one for secure access ๐.
Launch your EC2 instance ๐.
Step 3: Create an IAM Role with RDS Access ๐
Go to the IAM service in the AWS Management Console ๐ฅ๏ธ.
Choose "Roles" and click "Create role" ๐.
Select "EC2" as the use case for the role ๐.
Attach the "AmazonRDSFullAccess" policy to grant RDS access ๐ก๏ธ.
Complete the role creation by adding a name and description ๐.
Step 4: Assign the Role to EC2 Instance ๐
Navigate to your EC2 dashboard ๐ฅ๏ธ.
Select your EC2 instance and click "Actions" > "Security" > "Modify IAM Role" ๐ก๏ธ.
Assign the IAM role you created in Step 3 to your EC2 instance ๐.
Step 5: Connect EC2 Instance to RDS ๐ค
Once the RDS instance is up and running, go to the RDS dashboard ๐ฅ๏ธ.
Retrieve the database endpoint and login credentials ๐ก๏ธ.
Connect to your EC2 instance using a MySQL client ๐.