How Do You Troubleshoot the CloudWatch Command Line Error “no outputs found, did you provide a valid config file”?

Problem scenario
You think your amazon-cloudwatch-agent.toml file has been misconfigured. You run "amazon-cloudwatch-agent-ctl" but you get an error about "no outputs found, did you provide a valid config file." What should you do about this error?

Solution

  1. Use amazon-cloudwatch-agent-config-wizard to create the configuration file. From the command line it will walk you through step-by-step directions in text.
  2. Assuming the default configuration has been saved as "AmazonCloudWatch-linux" (based on how you responded above), run this command to get it to be used:

sudo amazon-cloudwatch-ctl -a fetch-config -m ec2 -c ssm:AmazonCloudWatch -linux -s

Leave a comment

Your email address will not be published. Required fields are marked *