AWS Cloudwatch Agent not picking up changes
Solution 1:
It's possible your agent state file is corrupted because you kept making changes to the configuration. There are two ways to fix this:
-
Option 1: Use a new name for your configuration block header.
- That is, change
[website.access.log]
to[something.else]
.
- That is, change
-
Option 2: Delete the agent state file after stopping the service.
sudo service awslogs stop sudo rm /var/lib/awslogs/agent-state sudo service awslogs start
Please note that Option 2 may initially cause duplicate logs to be pushed to CloudWatch as a new state file is created.