diff --git a/modules/runners/templates/start-runner.ps1 b/modules/runners/templates/start-runner.ps1 index 851d5a3d22..bdb9f0c851 100644 --- a/modules/runners/templates/start-runner.ps1 +++ b/modules/runners/templates/start-runner.ps1 @@ -30,7 +30,7 @@ Write-Host "Retrieved /$environment/runner/enable-cloudwatch parameter - ($enab $agent_mode=$parameters.where( {$_.Name -eq "/$environment/runner/agent-mode"}).value Write-Host "Retrieved /$environment/runner/agent-mode parameter - ($agent_mode)" -if ($enable_cloudwatch_agent) +if ($enable_cloudwatch_agent -eq "true") { Write-Host "Enabling CloudWatch Agent" & 'C:\Program Files\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent-ctl.ps1' -a fetch-config -m ec2 -s -c "ssm:$environment-cloudwatch_agent_config_runner"