Here are a few key recommendations and best practices that you ought to keep in mind when working with monitoring and logging services:
- Leverage AWS services for monitoring: Although still a long way from a fully potent monitoring solution, CloudWatch and X-Ray still are a good choice for starting out with monitoring your serverless applications. The ideal case would always be to leverage both these services together for a complete monitoring experience.
- Provide the correct IAM permissions: Most of the time the issues are not with your function's code, but rather caused due to incorrect or missing IAM policies and permissions. Always make sure you provide the IAM policies that follow the least privileged requirement in order to run your function and periodically ensure that unwanted or unused IAM roles and policies are removed from the...