While launching an EC2 Instance of type "Microsoft Windows Server 2016 Base" , I provide the few commands in the user data section using <Powershell></powershell>
but when my EC2 launches successfully, I do not see the scripts executed.
I am using the below script inside <Powershell></powershell>
Stop-Service -Name "Tomcat8"
cd "C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps"
rm ROOT -R
wget https://s3.ap-south-1.amazonaws.com/XYZ/ROOT.war -OutFile ROOT.war
Start-Service -Name "Tomcat8"
Do I need to enable something before launching the instance?
Before 2016 windows AMI, EC2Config Service was to be used to enable scripts to be run at launch, but I dont know how to do that on Microsoft Windows Server 2016.