title: How to submit the simple log with AWS CloudWatch Logs from frontend?
body: <p>After about 1 hour of searching, I didn't find anything about 'how to submit a simple log to AWS CloudWatch Logs' <strong>from the frontend side</strong>. Almost all examples are for Node.js, but I need to submit the errors from the frontend, not form backend. I even did not found which package which I should use for the frontend.</p>
  <p>To save, your time, I prepared the template of solution.</p>
  <pre><code>import { AWSCloudWatch } from &quot;?????&quot;;
  
  AWSCloudWatch.config({
    // minimal config
  });
  
  if (__IS_DEVELOPMENT_BUILDING_MODE__ || __IS_TESTING_BUILDING_MODE__) {
    console.error(errorMessage);
    return;
  }
  
  if (__IS_PRODUCTION_BUILDING_MODE__) {
    // Submit 'errorMessage' to AWS CloudWatch
    // It would be something like
    // AWSCloudWatch.submit(errorMessage)
  }
  </code></pre>