After installing the Amazon CloudWatch Agent on Windows and starting the service, it repeatedly crashes and restarts.
In the Windows Event Log the following events occur with the crash:
Event ID 7031
Error
The Amazon CloudWatch Agent service terminated unexpectedly. It has done this X times.
And:
Event ID 7039
Warning
A service process other than the one launched by the Service Control Manager connected when starting the Amazon CloudWatch Agent service. The Service Control Manager launched process XXX and process XXX connected instead.
In the amazon-cloudwatch-agent.log
file the last error is:
ec2tagger: Unable to initialize EC2 Instance Tags : +NoCredentialProviders: no valid providers in chain.