Logging Best Practices for AWS Lambda and Microservices

The Benefits of Logging

Visibility

Traceability

Supportability

Telemetry

Logging Pain Points

Logging Common Mistakes

  • No design for logging or thinking of logging as an afterthought instead of addressing it from the start
  • Lack of logging standards
  • Hard coding error messages
  • Lack of request identifiers to help you trace a request across microservice boundaries
  • Logging payloads or sensitive data (this happens frequently!
  • Logging too much information, which increases the price of your logging or storage solution
  • Logging too little, which doesn’t give you enough information to work from

Logging Best Practices in AWS Lambda

Standardize logs

Informative messages

Transaction Identifiers

Dynamic error messages

Persist logs into a centralized system

Log at appropriate levels

Log the appropriate amount of data

Use Lambda Layers

Conclusion

--

--

--

Aaron’s passion for technology drives him to find innovative ways to help advance organizations through technology.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kotlin: Control Flow Part 2 — Loops

Flash Stock Rom on Alcatel One Touch Pop C5 5037e

11111

The world’s lowest-priced travel platform “ttinolja”, will be reborn through the blockchain…

Running My Business From an iPad

Achieving the Atlantis Workflow with Spacelift

Python & SharePoint Folders

Docker setup in Linux Mint and Dockerize a Spring Boot application

What is tail recursion and tail call optimization?

What is tail recursion and tail call optimization?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aaron Lieberman

Aaron Lieberman

Aaron’s passion for technology drives him to find innovative ways to help advance organizations through technology.

More from Medium

De-Coupled Microservice Applications with AWS SNS-SQS and AWS Lambdas

Using AWS SAM to build and deploy an application with SNS, SQS and Lambda services

What’s New at AWS for 2022 — Introduction to Readable Standby Instances in RDS

Case Study: Integrate APIs using serverless AWS architecture