1. Use ebextentions. Here’s an example. 2. Here’s the Powershell script. You’ll need to zip up the script and upload it to S3 per the ebextentions config file above. $datetimef = get-date -format yy.MM.dd.HH.mm $log = 'C:\ebextentions\datadog\in... Write-Output ("$datetimef START install-datadog-agent.ps1") | Out-File $log -Append $agentInstalled = sc.exe query | findstr DatadogAgent if (!($agentInstalled)) { Write-Output ("$datetimef Datadog Agent service not detected, run ......