title: Configuration file for AWS Elastic Beanstalk that provides monitoring option for memory
body: <p>I have a node api deployed on elastic beanstalk. It consumes more memory (data read/writes are heavy) thus would like to set Scaling triggers based on Memory usage. Or atleast view memory usage on Metrics of Elastic Beanstalk (or Cloudwatch).</p>
  <p>I have used .ebextentsions configuration from <a href="https://serverfault.com/a/567407/943005">here</a> but could not get it working besides I found aws is providing amazon-cloud-watch agent (already installed on EC2 of Elastic Beanstalk) that could help.</p>
  <p>If we try to break my question it would look like below:</p>
  <ul>
  <li>Where to put cloudwatch configurtion json file?
  As I could create this using below steps from <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/metrics-collected-by-CloudWatch-agent.html" rel="nofollow noreferrer">link</a>.</li>
  <li>What to write in .ebextensions configuration file?</li>
  </ul>
  <p>Any comments/suggestions or reference(s) is appreciateted. Thank you!</p>