1

I am having an issue with CloudWatch Agent on a specific EC2 instance. I have tested on several other instance with no issue. I have attached the defined CloudWatch Agent IAM Role specified here to the instance (test instances as well): https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent.html

After attaching, I installed to instance (Ubuntu 16, same as test instances), ran wizard, then started the agent. The only modification I made to the .conf is to change the namespace from the default CWAgent.

I am only having issues with this one instance. Here are the log outputs:. As a note, this instance (as well as test instances) do not have awscli installed, and no defined aws credentials stored.

2021-05-09T08:14:56Z E! cloudwatch: code: NoCredentialProviders, message: no valid providers in chain, original error: EnvAccessKeyNotFound: failed to find credentials in the environment.
caused by: SharedCredsLoad: failed to load profile, .
EC2RoleRequestError: no EC2 instance role found
caused by: EC2MetadataError: failed to make EC2Metadata request
    status code: 404, request id: 
caused by: <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>404 - Not Found</title>
 </head>
 <body>
  <h1>404 - Not Found</h1>
 </body>
</html>
user665458
  • 11
  • 1

0 Answers0