You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Getting Started
Purchasing and using ECS instance
Copy page
Download PDF
Purchasing and using ECS instance
This topic introduces how to build an Elastic Compute Service (ECS) instance from scratch in the simplest way, including purchasing, connecting, deploying, and releasing the instance.​
Preparing account​
​
Preparations​
Description​
Get an account​
Recharge​
The balance requirement is applicable only when you purchase a Pay-as-you-go instance. Please refer to Instructions on account to make sure that the total value of the cash balance and coupons is ≥ 100 RMB. Otherwise, you may not be able to purchase resources. If the balance is insufficient, please recharge by following Recharge guide.​
​
Step 1: Purchase an instance​
  1. Log in to the ECS console. ​
  1. (Optional) If you have completed cross-service access authorization, skip this step. Otherwise, perform the authorization first to allow the ECS instance to access other services. For details, see Cross-service authorization.​
  1. In the left-side navigation pane, select "Instances & Images > Instances".​
  1. Click "Create instance" to purchase an ECS instance.​
  • The configuration listed in the table below is used in this topic. For parameters not covered, please use the default configuration.​
  • ​
    Configuration page​
    Parameter​​
    Recommended configuration​
    Details​
    Basic configuration​
    Billing method​
    Pay-as-you-go​
    Pay-as-you-go is a billing method where payment is made after usage. It is available for use immediately after activation. It can be stopped at any time, which is flexible. Learn more​
    ​
    Region and AZ​
    China (Beijing) A​
    Select a region closest to your service location.​
    Once the instance is created, you can not change the region. Please set it with caution.​
    ​
    Instance type​
    Instance type family: General-purpose ecs.g1ie​
    Instance type: ecs.g1ie.large​
    Different vCPUs and memory ratios are applicable for different business scenarios. The g1ie specification provides balanced vCPU, memory, and network capabilities. It can meet the service needs in most scenarios. Learn more​
    ​
    Image​
    Type: Public Images​
    Edition: CentOS 7.9​
    The platform provides multiple public images that include operating systems and essential application data. They are accessible to all users. Learn more​
    ​
    Storage​
    Default configuration​
    System volume: ESSD 40 GiB​
    Data volume: ESSD 20 GiB​
    After the instance starts, the system volume fully replicates the operating system and application data from the image. The data volume stores business application data. Learn more​
    Network configuration​
    Virtual Private Cloud​
    Default VPC​
    An isolated, customizable, and manageable virtual network environment for the ECS instance. Learn more​
    ​
    Subnet​
    Default subnet​
    A private IP address of the ECS instance for private network access. Learn more​
    ​
    Security group​
    Default security group​
    A security group is composed of multiple security group rules. It is used to control the outbound and inbound traffic at the ECS network interface. Learn more​
    tip​
    Security groups are designed based on the allowlist principle. By default, security groups deny the inbound and outbound traffic of network interfaces. Ensure that the required port, such as port 22 for remote login to the ECS instance, is allowed.​
    ​
    EIP​
    Select the EIP option​
    An EIP address of the ECS instance for Internet access. Learn more​
    Custom configuration​
    Login credentials​
    Key Pair​
    The credentials used for instance login. The "Key Pair" method is recommended, which provides high security. Learn more​
    ​
    Key pair​
    key01​
    Click "Create key pair". Enter a key pair name and quickly create a key pair used for instance login. Learn more​
    warning​
    After the creation, the private key file is automatically downloaded to your local machine. The default file name is key_name.pem. You have only one chance to download the private key. The platform does not save your private key. Please keep it secure.​
    ​
    Instance name​
    ECS-Instance01​
    You can customize an instance name.​
    ​
  1. Click "Next" and follow the console instructions to read and confirm the agreement.​
  1. Click "Buy now". A page with that prompts submission success appears. On this page, you can view whether the ECS instance is created.​
  1. Click the "Go to console" button to go to the Instances page and view the newly created instance and its public and private IP addresses.​
Step 2: Log in to the instance​
  1. On the Instances page, find the instance ECS-Instance01 you created. Click "Connect" in the "Actions" column.​
  1. In the dialog box that appears, click "Log in now" in the ECS Terminal section.​
  1. On the login page, configure the following login settings and click "Login".​
  • Port and username: For Linux operating systems, the username is root, and the port is 22 by default.​
  • Authentication method: Select "Key".​
  • Key: Click ​​ to upload the key that you have created during custom configuration when purchasing the instance. This is the key that was automatically downloaded to your local machine.​
For more instance login methods, refer to Logging in to instance.​
Step 3: Partition and format the data volume​
If you purchase a data volume when you create the instance, partition and format the data volume after you log in to the instance. After doing this, you can use the data volume. Follow the appropriate document based on the capacity of your data volume and the image type.​
Step 4: Deploy business operations​
  • For how to deploy business environments within the instance, refer to:​
Step 5: Enable business port access and access the business (important)​
Enable the business ports provided externally by the ECS, allowing the port to be accessed. Otherwise, third parties are not able to access the ECS instance.​
  1. Click the name of the purchased instance. Then, click the "Security Group" tab.​
  1. In the Actions column of the security group, click "Edit rule". You are redirected to the "Access rules" tab.​
  1. You can add a rule. Select the "Inbound rules" tab and click "Add rule" to add an inbound rule. For example, the business port is 1122, the following configuration allows access from any address to the business on 1122 port of the ECS instance:​
  1. Click "Add". The action is complete.​
  1. Access your business via the following methods:​
  1. Access via private network: Any ECS instance in the VPC where the purchased instance resides can access the business through http://<instance private IP address>:1122.​
  1. Access via Internet: Any server on Internet can access the business through http://<instance Elastic IP (EIP)>:1122.​
Step 6: Manage/Release the instance​
  • If you no longer need an ECS instance, you can refer to Deleting instances to delete it. After the deletion, the data can not be recovered.​
​
​
​
Last updated: 2026.06.18 16:37:45