Create a DB instance - Amazon Relational Database Service

Create a DB instance

In this step, you create an Amazon RDS for MySQL DB instance that maintains the data used by a web application.


Before you begin this step, make sure that you have a VPC with both public and private subnets, and corresponding security groups. If you don't have these, see Tutorial: Create an Amazon VPC for use with a DB instance (IPv4 only). Complete the steps in Create a VPC with private and public subnets, Create a VPC security group for a public web server, and Create a VPC security group for a private DB instance.

To create a MySQL DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at

  2. In the upper-right corner of the AWS Management Console, choose the AWS Region where you want to create the DB instance. This example uses the US West (Oregon) Region.

  3. In the navigation pane, choose Databases.

  4. Choose Create database.

  5. On the Create database page, shown following, make sure that the Standard create option is chosen, and then choose MySQL.

                            Select engine
  6. In the Templates section, choose Free tier.

  7. In the Settings section, set these values:

    • DB instance identifiertutorial-db-instance

    • Master usernametutorial_user

    • Auto generate a password – Clear the check box.

    • Master password – Choose a password.

    • Confirm password – Retype the password.

                        Settings sections
  8. In the Instance configuration section, set these values:

    • Burstable classes (includes t classes)

    • db.t3.micro

                                Instance configuration section
  9. In the Storage section, use the default values.

  10. In the Availability and durability section, use the default values.

  11. In the Connectivity section, set these values:

    • Virtual private cloud (VPC) – Choose an existing VPC with both public and private subnets, such as the tutorial-vpc (vpc-identifier) created in Create a VPC with private and public subnets.


      The VPC must have subnets in different Availability Zones.

    • Subnet group – Choose a DB subnet group for the VPC, such as the tutorial-db-subnet-group created in Create a DB subnet group.

    • Public access – Choose No.

    • VPC security group – Select Choose existing.

    • Existing VPC security groups – Choose an existing VPC security group that is configured for private access, such as the tutorial-db-securitygroup created in Create a VPC security group for a private DB instance.

      Remove other security groups, such as the default security group, by choosing the X associated with each.

    • Availability Zone – Choose us-west-2a.

      To avoid cross-AZ traffic, make sure the DB instance and the EC2 instance are in the same Availability Zone.

    • Open Additional configuration, and make sure Database port uses the default value 3306.

                        Connectivity section
  12. In the Database authentication section, make sure Password authentication is selected.

  13. Open the Additional configuration section, and enter sample for Initial database name. Keep the default settings for the other options.

  14. To create your MySQL DB instance, choose Create database.

    Your new DB instance appears in the Databases list with the status Creating.

  15. Wait for the Status of your new DB instance to show as Available. Then choose the DB instance name to show its details.

  16. In the Connectivity & security section, view the Endpoint and Port of the DB instance.

                        DB instance details

    Note the endpoint and port for your DB instance. You use this information to connect your web server to your DB instance.

  17. Complete Create an EC2 instance and install a web server.