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 Answer
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
answered 5 months ago
  • No, command is fine, it's the same command. Also, this command for Linux works fine. Problem is only with Windows.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions