Since you only enter the login password once when creating a stack, and the password is masked when being entered, it is possible to enter the wrong password and lock you out of your Elastic Compute Service (ECS), ApsaraDB for RDS (RDS), or other resource instances.


When defining InstancePassword, set Confirm to true to enable password confirmation, which solves the problem. If you have "Confirm": true in the template, you are required to enter the same password twice in the Activate Stack page to create the stack.

The method is as follows:

  1. When editing a template, set "Confirm": true.


    "InstancePassword": {
        "Confirm": true,
        "NoEcho": true,
        "MaxLength": "41",
        "Description": "Login password of the ECS instances",
        "Type": "String",
        "ConstraintDescription": "Consist of 8 to 41 alphanumeric characters ",
        "MinLength": "8",
        "AllowedPattern": "[a-zA-Z0-9]*",

    Confirm can only be used when NoEcho is true.

  2. Enter the instance password on the Activate stack page.