All Products
Document Center

1. Preparation

Last Updated: Jan 09, 2020

This tutorial describes how to create a RDS instance, a VPC, a VSwitch, and a security group before accessing the RDS instance in the VPC. Skip this tutorial if you have already created these resources.

Note: Create the VPC, security group, and RDS instance in the same region. For more information, see Regions and zones.


  1. Navigate to the VPC console and see the VPC topic Create a VPC to create a VPC.

  2. Log on to the ECS Security Groups page and see the ECS topic Create a security group to create a security group.

    Note: Set the Network Type of the security group to VPC, and then select the VPC that you previously created.

  3. Go to the ApsaraDB for RDS console, and click Create Instance.

    1. In the Basic Configuration field, specify the parameters as needed. Use the default parameters if you do not require custom parameters.
    2. In the Network field, set the Network Type to VPC, and select the VPC and VSwitch you previously created.
    3. Specify the Storage and Purchase Plan that you require, and click Buy Now to create the RDS instance.
  4. After the RDS instance is created, see RDS topics Set whitelist to set the IP whitelist for the RDS instance.

    Specifically, you can set the High Security White List Mode option to, which indicates that your RDS allows access request from any device in your VPC. Be reassured that your RDS instances are safe in VPC and have no security vulnerabilities.

  5. Connect to your RDS instance.

    Take MySQL 5.7 as an example, click the RDS instance ID and enter the instance detail page:

    1. In the left-side navigation pane, click Databases > Create Database, set the Database Name and Supported Character Set, and click OK to create database and account.

    2. In the left-side navigation pane, click Accounts > Create Account, set your Password, and click OK to create an account.

    3. Click the Log on to DB and use the account you created. In the Basic Information area, you can find the Internet and intranet addresses and port numbers. Complete the permission authorization if necessary.

    4. After you log on to the DMS, select one database and you can create tables and insert data.

      Depending on the DB engine and version of RDS instance, creating databases and connecting to instances vary. For more information, see RDS topics:

Next step

Allow the VPC access for Function Compute.