Is the UserData part stored anywhere on a Windows EC2 machine? I need to examine it to see that input variables are correct.
On Ubuntu, it's supposed to be stored at /var/lib/cloud/instances/[instance-id]/user-data.txt according to this link.
The user data section in CloudFormation looks like this:
"UserData" : {
"Fn::Base64" : {
"Fn::Join" : [
"",
[
"<script>\n",
"seedtool.exe ", { "Fn::GetAtt" : [ "DatabaseCluster" , "Endpoint.Address" ] }, "\n",
"</script>\n"
]
]
}
},
I need to see the user-data.txt so I can see what { "Fn::GetAtt" : [ "DatabaseCluster" , "Endpoint.Address" ] } resolves to.
For anyone looking for the actual location of the userdata script, it should be in:
C:\Windows\System32\config\systemprofile\AppData\Local\Temp\Amazon\EC2-Windows\Launch\InvokeUserData\UserScript.ps1
Note that files in this location (...\AppData\Local\Temp\) may be removed by cleanup processes or tools during the instance's lifetime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With