AWS User Data Syntax and Supported Variables
User data allows you to configure an AWS VM during provisioning, or to run a configuration script on a VM. User data allows you to, for example:
- customize the deployed VM's host name during provisioning
- run scripts after the VM starts and perform common automated configuration tasks
- enable CloudWatch monitoring for new VMs
With Commander, you can add user data:
- to an AWS service catalog component; the user data is then applied during deployment of a service request
- when manually deploying an AWS VM from a template
Both scripts and cloud-init directives are supported.
User data is limited to 16 KB. For longer user data, point to a script file instead.
New lines and carriage returns are preserved.
Unicode characters are not supported.
You can use Commander variables in the User Data field; see the next section for details.
Escaping variables is not supported; variables are substituted when valid within the current context.
Commander doesn't perform user data input validation, aside from Commander variables. Consult the Amazon EC2 documentation for more information on prerequisites and syntax:
Only a few variables are supported when manually deploying an AWS template. If you use variables that are supported only in the service catalog user data when manually deploying an AWS template, the variables will be passed as text (they won't be substituted).
Clicking in any text field that supports variables opens the Variable Assistant, which allows you to select variables for the current context and provides help for each variable.
Note that once the user data is passed to AWS during deployment, Commander doesn't provide feedback on the success or failure of the configuration process. The following information was valid at time of publication; consult the AWS documentation for more information troubleshooting customization with user data.
For Linux, the cloud-init log file (found at
/var/log/cloud-init.log) captures console output, allowing you to debug your scripts if the VM is not configured as intended.
The AWS user data log can be found on the deployed VM at:
AWS user data (.bat and PowerShell scripts) are stored here on the deployed VM:
You can check whether the user data has been imported correctly by browsing to this URL on the deployed VM: