Create RDS

  1. Access Amazon RDS console
  • Click Create database

RDS

  1. Under Create database console
  • Choose a database creation method

    • Choose Standard create RDS
  • Engine options

    • Engine type: Choose MySQL RDS

    • Edition: MySQL Community

    • Engine version: Choose your suitable version. In my case, the version is MySQL 8.0.35 RDS

  • Template: Choose Free tier RDS

  • Settings

    • DB instance identifier: bistro-database
    • Credentials Settings
      • Master username: your username
      • Master password: your password

RDS

  • Instance configuration

    • DB instance class: db.t3.micro RDS
  • Conectivity

    • Compute resource: Connect to an EC2 compute resource
    • EC2 instance: Choose created EC2 - BistroCheese RDS
  • DB subnet group: Choose existing

  • Existing DB subnet groups: db-subnet-groups (this is group subnet that we created in the preparation)

  • VPC security group (firewall): Create new

  • New VPC security group name: rds-ec2-sg

    This will create a new security group that allows inbound traffic on port 3306 (the default port for MySQL) from any IP address. You can also choose Choose existing and select an existing security group that has the same rule. You can also modify the rule later to limit access to your database from specific IP addresses or CIDR blocks.

    RDS

  • Database authentication

    • Database authentication options: Password authentication

You can also choose IAM authentication if you want to use AWS Identity and Access Management (IAM) to manage access to your database.

RDS

Under Monitoring, choose Enable Enhanced Monitoring and enter 60 as the granularity. This will enable the enhanced monitoring feature of Amazon RDS, which will collect and display metrics about your database instance every 60 seconds. You can also choose Disable Enhanced Monitoring if you don’t want to use this feature. You can also modify the monitoring role and the additional metrics settings later.

  • Additional configuration
    • Initial database name: bistro-database
    • Backup retention period: choose 7 days

This will enable the automated backup feature of Amazon RDS, which will take daily snapshots of your database and store them for 7 days. You can also choose Disable automatic backups if you don’t want to use this feature. You can also modify the backup window and the backup encryption settings later.

RDS

Please note that automated backups are currently supported for InnoDB storage engine only. If you are using MyISAM, refer to details here.

  • Click Create database RDS

When your database is created completely, if you check the Security group, you will see 2 new Security groups (ec2-rds-1, rds-ec2-1) that are created automatically to allow traffic from EC2 to come to the MySQL database.