Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
Logs not showing up in AWS Cloudwatch

I have been trying to get logging to work on AWS Cloudwatch but have been unsuccessful so far. I am running a python flask backend on Fargate and handling logging through Cloudwatch. Only error messages are showing up however and nothing about the logs I have inserted. I will get error messages on cloudwatch and startup messages but no logs.

 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Restarting with windowsapi reloader
 * Debugger is active!
 * Debugger PIN: 222-692-161
 * Running on http://0.0.0.0:6000/ (Press CTRL+C to quit)

127.0.0.1 - - [03/Nov/2020 09:47:23] "GET /health HTTP/1.1" 200 -

This is shown on Cloudwatch, the flask startup dialogue and messages that the healthcheck query worked properly/ However no logs from within my health check. I have tried 2 strategies.

  1. The logging library
import logging

logger = logging.getLogger(level=logging.INFO)
log.info("This is an informative log")

and I have also define a print function to send data to stderr so I could have cloudwatch pick it up


def eprint(cls, *args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
eprint("this is another informative log")

I am not sure why neither of these solutions is working as Cloudwatch should pick up on data sent to stderr. Is there a way to enable Cloudwatch logs in a few lines of code and as minimally invasive as possible?

Thank you in advance!

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!