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.

Important

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. Complete the steps in Create a VPC with private and public subnets, Create additional 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 https://console.aws.amazon.com/rds/.

  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 – Disable the option.

    • Master password – Choose a password.

    • Confirm password – Retype the password.

    
                        Settings sections
  8. In the DB instance class section, enable Include previous generation classes, and set these values:

    • Burstable classes (includes t classes)

    • db.t2.micro

    
                                DB instance class section
  9. In the Storage and Availability & durability sections, use the default values.

  10. 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

      Note

      The VPC must have subnets in different Availability Zones.

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

    • Public accessNo

    • VPC security groupChoose 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 ZoneNo preference

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

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

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

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

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

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

  15. 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.

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