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.