title: How to configure AWS cloudWatchAgent to collect logs recursively from a folder on an EC2 instance?
body: <p>I have a <code>logs</code> directory on a EC2 instance and cloud watch agent running over there. In the CloudWatch agent configuration file I have given log file details as below</p>
  
  <pre><code>"logs": {
      "logs_collected": {
        "files": {
          "collect_list": [
            {
              "file_path": "/home/ec2-user/logs/**/*",
              "log_group_name": "test0",
              "log_stream_name": "{instance_id}"
            }
          ]
        }
      }
    }
  </code></pre>
  
  <p>but this is not collecting logs recursively. I want cloud agent to send all the logs present under one directory(having nested directories as well) to cloud watch logs.
  How is that possible?</p>