All Products
Search
Document Center

ApsaraDB for MongoDB:Configure a VPC for a new instance

Last Updated:Mar 28, 2026

ApsaraDB for MongoDB uses a virtual private cloud (VPC) as its default network type. This topic explains how to select a VPC when creating a new ApsaraDB for MongoDB instance.

Before you begin

Choose the path that fits your situation:

SituationAction
No existing ApsaraDB for MongoDB instanceCreate a VPC first, then create an instance in that VPC — follow this topic
Instance already existsCreate a VPC in the same region, then migrate the instance to it — see Switch the network type

Prerequisites

Before you begin, make sure that you have:

  • A VPC in the same region where you plan to create the ApsaraDB for MongoDB instance. To create one, see Create and manage a VPC

  • A vSwitch in that VPC

Note The ApsaraDB for MongoDB instance and the VPC must be in the same region. You cannot change the region after the instance is created.

Network types

ApsaraDB for MongoDB supports two network types:

Network typeDescription
Classic networkCloud services share the same network and are not isolated from each other. Access control relies on security groups or whitelist policies.
VPCProvides an isolated private network in Alibaba Cloud. You can customize the route table, IP address range, and gateway, and connect your on-premises data center to Alibaba Cloud resources using a physical connection or VPN.

VPC is the default network type for ApsaraDB for MongoDB.

Create an instance in a VPC

  1. Log on to the ApsaraDB for MongoDB console and click Create Instance.

  2. Set Network Type to VPC.

  3. Configure the VPC and vSwitch fields:

    ParameterDescription
    VPCSelect the VPC where you want the instance to run. Only VPCs in the same region as the instance are listed.
    vSwitchSelect a vSwitch within the chosen VPC. The vSwitch determines the zone and IP address range for the instance.
  4. Configure the remaining instance parameters based on your deployment type: