Setting Up a MySQL Database on AWS with Free Tier Resources ๐Ÿš€

ยท

2 min read

Setting Up a MySQL Database on AWS with Free Tier Resources ๐Ÿš€

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 ๐Ÿš€.

ย