Monitoring the operation
The serverless concept is defined as running your code without worrying about the infrastructure that will be responsible for supporting it. This still holds true, but there are some DevOps tasks that may improve your application's efficiency and stability. Therefore, you should not confuse serverless with NoOps. You just don't need to worry that much about the infrastructure.
Since we are using AWS, we are going to use its monitoring tool: Amazon CloudWatch. There are some other paid and free tools that can also be used for this task, so feel free to compare them before selecting your own tool.
To use CloudWatch, open the Management Console at https://console.aws.amazon.com/cloudwatch, and let's see in the following subsections how we can monitor our Lambda functions:
Monitoring costs
Estimating costs in serverless is a difficult task, since it depends highly on usage. Also, deploying a new function may result in unexpected costs due to programming errors. For example...