This topic describes how to modify existing user data of an instance in the console.

Prerequisites

  • User data is configured for an instance. For more information, see Manage user data.
  • The instance is stopped. For more information about how to stop an instance, see Stop an instance.

Background information

After you modify the user data, whether the instance runs the modified user data depends on the script and module type. Examples:
  • If you use a shell script as user data, such as the User-Data script, the instance does not run the modified user data.
  • If you use user data to configure modules such as Byobu, Set Hostname, and Set Passwords, the instance does not run the modified user data.
  • If you use user data to configure modules such as bootcmd, update_etc_hosts, and yum_add_repo, the instance runs the modified user data.
Note For a pay-as-you-go instance of the VPC type, if you want to restart the instance after you modify its user data, we recommend that you disable the No Fees for Stopped Instances (VPC-Connected) feature.

For more information, visit the Module frequency section of Modules in the cloud-init documentation.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance for which you want to modify the user data and choose More > Instance Settings > Set User Data in the Actions column.
  5. In the Set User Data dialog box that appears, enter information and click OK.
    Set User Data