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

510
Views
Logging for Nodejs Express on AWS Fargate

I am developing an app with Nodejs/Express and I am planning to run the app on AWS Fargate. For logging, I want to have the app logs available in AWS Cloudwatch. What is the best way to log Nodejs/Express to Cloudwatch? Is there a library which I can use?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There are many ways to collect logs, are you writing to the console, or using some logging tool. Here are some ideas:

If you are using Amazon ECS or Fargate with ECS then you can use the AWS Log driver.

If you are using Amazon EKS or Fargate with EKS then you can configure FluentD to log to cloudwatch.

CloudWatch Agent for Docker.

Use CloudWatch Container Insights to collect, aggregate, and summarize metrics and logs from your containerized applications and microservices. Container Insights is available for Amazon Elastic Container Service (Amazon ECS), Amazon Elastic Kubernetes Service (Amazon EKS), and Kubernetes platforms on Amazon EC2. Amazon ECS support includes support for Fargate.

In addition to logs, and insights you can log interactions between microservices using X-Ray. Here are some X-Ray examples with Fargate.

The EKS control plane can also be configured to log directly to CloudWatch.

As you mentioned you are using Node.Js, if you did not want to use console logging, but rather a library here are three:

  • Winston (Medium Blog Post)
  • AWS Javascript SDK
  • Pino
over 4 years ago · Santiago Trujillo Report
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!