CloudWatch agent is in stopped state on the EC2 based on AMI

0

Hi,

I created AMI where I installed and configured CW agent. Here is my config file in ami builder component:

Enter image description here

It works fine when it's building instance and testing. But when I create EC2 based on this ami, CW agent is in stopped state so I need manually to run again the previous command. Then I see CW group.

The logs of EC2 with stopped CW agent:

Enter image description here

IAM role has full CW permissions.

The same procedure for Linux works well.

Thanks.

1 Risposta
0

Hi, it looks like your output is mixing logs from 2 different executions, which makes it harder to relate. It seems strange that the line 11 in your first screenshot seems to hold a truncated command. When you run it manually in your second screenshot, you're apparently passing -c ssm:WinParameter1 as the last parameter, but it doesn't seem to be what's configured in the 1st screenshot. If you have both an ssm_WinPar.tmp and an ssm_WinParameter1.tmp files in your Configs folder, comparing the diffs between them might help you spot an issue. If you only have an ssm_WinParameter1.tmp file in your Configs folder, then you may need to update the command.

profile pictureAWS
Jsc
con risposta 5 mesi fa
  • No, command is fine, it's the same command. Also, this command for Linux works fine. Problem is only with Windows.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande