I am trying to use an AWS Cloudwatch rule that runs a powershell script on a EC2 Instance using SSM. The script works when I hard code the instance ID in the command section of the RunPowerShellScript Document. But when I use the same command in the Input Transformer to get the Instanceid as a variable from the Cloudwatch event I get the following error:
"There was an error while saving rule DisableInAD. Details: InputTemplate for target Id111111 contains placeholder within quotes.."
The input Command I am trying to use is: {"commands":["C:\\users
\\documents\\Disable_Single_Instance -Id <instance>"]}