AWS/User data

From Ever changing code
< AWS
Revision as of 00:10, 19 May 2019 by Pio2pio (talk | contribs) (Created page with "User_data scripts have many derivatives depends on operating system, and following do parse the script: *Linux - uses cloud_init *Windows 2012 - ec2config *Windows 2016< - ec2...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

User_data scripts have many derivatives depends on operating system, and following do parse the script:

  • Linux - uses cloud_init
  • Windows 2012 - ec2config
  • Windows 2016< - ec2launch

Ec2launch

Configuration file

C:\ProgramData\Amazon\EC2-Windows\Launch\Config\LaunchConfig.json


Log files are in C:\ProgramData\Amazon\EC2-Windows\Launch\Log

*Ec2Launch.txt - the app itself logs
*UserDataExecution.txt - contains parsing details and the script output
*WallpaperSetup.txt -


Script parsing sections:

<script>cmd://batch commands</script>  #always is parsed 1st
<powershell></powershell>              #2nd
<persist>true</persist>               #by default is false, true will run on each reboot
<runAsLocalSystem></runAsLocalSystem>
<powershellArguments></powershellArguments>