All Products
Search
Document Center

Serverless App Engine:Isolate development, testing, and production environments using namespaces

Last Updated:Apr 01, 2026

Running the same application across dev, test, and prod on shared infrastructure risks configuration drift and accidental cross-environment interference. SAE namespaces let you deploy isolated copies of your application in the same region, with network-level separation enforced by Virtual Private Cloud (VPC) boundaries. Each namespace is bound to exactly one VPC, and applications in the same namespace are in the same VPC.

This topic shows you how to create three namespaces (dev, test, prod), deploy an application to dev, copy it to the other environments, and use batch operations to start or stop entire environments at once.

Important

Assigning a different VPC to each namespace is what enforces network isolation. If two namespaces share a VPC, applications in those namespaces can communicate over the internal network and may interfere with each other.

Prerequisites

Before you begin, ensure that you have:

  • An Alibaba Cloud account with SAE access

Step 1: Create namespaces

Create a separate namespace for each environment and bind each to a different VPC. This topic uses China 1 (Hangzhou) as the example region.

Create the dev namespace

  1. Log on to the SAE console. In the top menu bar, select the region where you want to deploy your application.

  2. In the navigation pane, choose Namespace, then click Create Namespace. Set Namespace Name and Namespace ID to dev.

  3. Click Create VPC to open the VPC Management Console. Make sure Region matches your application's deployment region. Set Name to dev-vpc and configure the IPv4 CIDR Block as needed. For details, see Create and manage a VPC.

  4. Create two vSwitches in different zones within dev-vpc to improve application availability. Set the Name, Zone, and IPv4 CIDR Block for each vSwitch, then click +Add to add the second vSwitch. For details, see Create and manage a vSwitch.

    vSwitches within the same VPC can communicate over the internal network.
  5. Return to the Create Namespace panel in the SAE console. Set Virtual Private Cloud to dev-vpc, then click OK.

Create the test and prod namespaces

Repeat the steps above to create the test and prod namespaces, binding each to a new, dedicated VPC.

Step 2: Deploy applications

Deploy your application to dev first, then copy it to test and prod. Copying preserves the application configuration so you can adjust it per environment — for example, by changing instance counts or environment variables.

  1. In the navigation pane, choose Application Management > Applications. Set Namespace to dev, then click Create Application. For each application, select the VPC and vSwitches you created in Step 1. For details, see Deploy an application.

  2. In the Applications list, select an application. In the Actions column, click Copy. Set Namespace to test or prod and update the configuration for the target environment.

  3. Repeat for each application until all applications are deployed to test and prod.

Step 3: Manage environments with batch operations

Use batch operations to start or stop all applications in a namespace at once. This is useful for shutting down dev and test outside business hours to reduce costs.

What's next

  • To promote a tested application from test to prod, use the Copy action again and verify the production configuration before starting the application.