AWS Lambda logging best practices
Logging is very important to developers as it helps us more efficiently debug a system in production and the steps that led to the occurrence of the bug.
In this post, we look at ways to make logging better.
Logging is very important to developers as it helps us more efficiently debug a system in production and the steps that led to the occurrence of the bug.
In this post, we look at ways to make logging better.
The serverless default for CloudWatch Logs is to keep the logs forever. CloudWatch Logs are pretty expensive to keep around indefinitely. In the serverless.yml file, we’re able to set how long the cloudwatch logs are kept for. I recommend keeping them for at least 7 days but 30 days is probably more ideal.