ApsaraDB for MongoDB offers Serverless instances that are ideal for small and medium-sized businesses. This topic describes how to create an ApsaraDB for MongoDB Serverless instance.
Prerequisites
You have registered an Alibaba Cloud account. For more information, see Sign up with Alibaba Cloud.Precautions
- ApsaraDB for MongoDB discontinued new purchases of Serverless (Preset Capacity) instances on July 11, 2022. The features of existing instances are not affected. For more information, see [Notice] ApsaraDB for MongoDB Discontinues New Purchases of Serverless (Preset Capacity) Instances.
- If your application is deployed on an ECS instance, ensure that the ApsaraDB for MongoDB instance and the ECS instance meet the following conditions for network connectivity.
- They are in the same region. If you have already created an ECS instance, you can view its region. For more information, see View the region of an ECS instance.
- Optional: We recommend that they are in the same zone to reduce network latency. If you have already created an ECS instance, you can view its zone. For more information, see View the region of an ECS instance.
- The network type must be Virtual Private Cloud (VPC). If you have an existing ECS instance, you can check its network type. For more information, see View the network type of an ECS instance. If the network type of the instance is Classic Network, you can migrate the instance from the Classic Network to a Virtual Private Cloud. For more information, see Migrate an ECS instance from a classic network to a VPC.
Billing
ApsaraDB for MongoDB Serverless instances support the subscription billing method. For more information about billing, see Billing items and pricing.
Procedure
- Log on to the ApsaraDB for MongoDB console.
- In the navigation pane on the left, click Serverless Instances.
- On the Serverless Instances page, click Create Instance.
- In the Product Type section, select Serverless (Preset Capacity).
- Set the following parameters for the Serverless instance.
Parameter Description Region Select the region where the instance resides. Note- After an instance is created, you cannot change its region. Select a region with caution.
- If your application is deployed on an ECS instance, select the same region as the ECS instance. Otherwise, the instances cannot communicate over the internal network.
Zone Select the zone where the instance resides. Note- If your application is deployed on an ECS instance, we recommend that you select the same zone as the ECS instance to reduce network latency.
- You can select multiple zones to implement zone-disaster recovery.
VPC Select a VPC for the instance. If you do not have a VPC available, you can create one in the VPC console. For more information, see Create and manage a VPC. Note To change the network type, see Switch the network type of an instance.vSwitch Select a vSwitch for the instance. If you do not have a vSwitch available, you can create one in the VPC console. For more information, see Create and manage a vSwitch. Compute Specification Select the compute specification of the instance. Valid values: 100 to 8,000 compute units (CUs). The step size is 100 CU. Storage Space Select the storage capacity of the instance. Valid values: 1 GB to 100 GB. The step size is 1 GB. Password Set the password for the database account. The password must meet the following requirements: Important After a Serverless instance is created, the system provides a default database account. You cannot create new database accounts.- The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters are:
!@#$%^&*()_+-=
- The password must be 8 to 32 characters in length.
Instance Name The custom name of the instance. Quantity Select the number of instances that have the same configuration. You can specify an integer from 1 to 99. Subscription Duration Select a subscription duration. You can select 1, 7, or 14 days. You can also select a monthly subscription of 1 to 9 months, or an annual subscription of 1 to 5 years. - Purchase the instance.
- After you configure the instance, click Buy Now.
- On the Confirm Order page, review the configuration details, and then read and select the Terms of Service.
- Click Proceed to Payment and complete the payment on the Payment page as prompted.
- Verify that the Serverless instance is created.
- After you complete the payment, click Management Console to navigate to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and region of your instance.
- In the navigation pane on the left, click Serverless Instances.
- Verify that the new instance appears in the Serverless instance list.
- Yes. The instance is successfully created when its status is Running.
- If the instance is not in the list, wait 10 to 15 minutes and then refresh the page. If the instance still does not appear in the list, check for the following possible causes. If the issue persists, contact Alibaba Cloud technical support.The following table describes possible causes and solutions.
Possible cause Solution Incorrect region selected In the upper-left corner of the ApsaraDB for MongoDB console, select the resource group and region where the instance is located. Incorrect instance list selected In the navigation pane on the left of the ApsaraDB for MongoDB console, select Serverless Instances. Insufficient resources The payment for a new instance may be refunded due to insufficient resources.
After you confirm the refund, select another zone and try to purchase an instance again.
Related API operations
| API operation | Description |
| DescribeInstanceAutoRenewalAttribute | Queries whether auto-renewal is enabled for an ApsaraDB for MongoDB instance. |
| DescribeDBInstanceAttribute | Queries the details of an ApsaraDB for MongoDB instance. |
What to do next
After the instance is created, perform the following operations:- Optional: If you did not set a password during instance creation, reset the password. For more information, see (Optional) Reset a password.
- Configure a whitelist for the instance to allow access from external devices. For more information, see Configure a whitelist.
- Optional: To connect to the instance over the public network, apply for a public endpoint. For more information, see (Optional) Apply for a public endpoint.
该文章对您有帮助吗?