Before using Serverless App Engine (SAE) to host applications, you must complete the following prerequisites: activating the service, granting permissions to a RAM user, creating a virtual private cloud (VPC), and creating a namespace. A VPC provides an isolated network environment, while a namespace provides an isolated resource environment.
Step 1: Activate service and grant permissions
Before you use SAE, you must activate the SAE service. You can activate SAE for free. After activation, you are charged based on your actual usage. SAE supports two billing methods: pay-as-you-go and resource plans. For more information, see Billing overview.
-
Go to the product page of SAE.
-
Click Buy Now.
-
On the Log On page, enter your Alibaba Cloud account and password, and then click Log On.
-
On the Serverless App Engine page, select I have read and agree to the Serverless App Engine Terms of Service, and then click Activate Now.
-
On the Activated. page, click Console. In the Welcome to Serverless App Engine (SAE) dialog box, click Confirm.
(Required for RAM users) Step 2: Grant permissions
The first time you sign in to the SAE console as a RAM user, SAE displays the Welcome to Serverless App Engine (SAE) dialog box and prompts you to grant permissions to the RAM user. This grants the RAM user access to the required Alibaba Cloud resources. For more information, see Grant permissions to a RAM user.
The dialog box lists the required permission policies, including AliyunSLBReadOnlyAccess (read-only access to Server Load Balancer (SLB)), AliyunACMFullAccess (manage Application Configuration Management (ACM)), AliyunECSReadOnlyAccess (read-only access to Elastic Compute Service (ECS) to select a security group when you create an application), AliyunOOSReadOnlyAccess (read-only access to Operation Orchestration Service (OOS) to start and stop applications in batches on a schedule), AliyunBSSReadOnlyAccess (read-only access to Billing Management to view the remaining resource plan quota), AliyunARMSReadOnlyAccess (read-only access to Application Real-Time Monitoring Service (ARMS) for application monitoring), AliyunRAMReadOnlyAccess (read-only access to RAM to query the permission list), AliyunCloudMonitorReadOnlyAccess (read-only access to CloudMonitor for basic monitoring), AliyunContainerRegistryReadOnlyAccess (read-only access to Container Registry), AliyunALBReadOnlyAccess (read-only access to Application Load Balancer (ALB)), AliyunYundunCertReadOnlyAccess (read-only access to SSL Certificates Service), and AliyunEventBridgeReadOnlyAccess (read-only access to EventBridge to create and update jobs). After you review the list of permissions, click Acknowledge and Do Not Remind Again.
Step 3: Create a VPC
A VPC provides a fully isolated network environment for your applications. Applications within the same VPC can communicate with each other, which improves security at the network level. For more information, see Create and manage a VPC.
-
If you have not activated the virtual private cloud (VPC) service, follow the on-screen prompts to activate it.
-
The VPC must be in the same region as the namespace you create in Step 4: Create a namespace.
Step 4: Create a namespace
A namespace provides a logically isolated runtime environment that facilitates application service calls and distributed configuration pushes. If you have multiple environments, such as development, testing, and production, use a separate namespace for each. This helps you manage applications, start or stop them with a single click, and improve application security.
-
Log on to the SAE console. In the left-side navigation pane, click Namespace. In the top navigation bar, select the target region.
-
On the Namespace page, click Create Namespace.
-
In the Create Namespace panel, configure the following parameters and click OK.
Parameter
Description
Example
Namespace Name
A custom name for the namespace.
test
Namespace ID
-
The prefix is determined by the selected region and cannot be changed. For example, the prefix for the China (Shenzhen) region is
cn-shenzhen. -
You can specify a custom suffix. The Namespace ID cannot be changed after creation.
demo
Description
A custom description for the namespace.
For testing purposes.
VPC
Select an existing VPC. A namespace can be associated with only one VPC, but a single VPC can be associated with multiple namespaces. After a namespace is created, you can switch its associated VPC.
NoteBefore switching the VPC for a namespace, you must delete all applications within it.
vpc-wz9i4zexkzbqceo5n****
-