Logging in Lambda
It is important to use logging functionality in order to trace your application. In some cases, you need to get information about an application; alternatively, you may be processing data via Lambda and you may get an exceptional result. Hence, logging is helpful to check the information to understand the real problem in the application.
There are multiple logging libraries that you can use in Lambda, including this one: https://docs.python.org/3/library/logging.html
In the following example, just add a log and return a value:
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def handler_name(event, context): logger.info('Process has finished and result will be returned') return { "statusCode": 200, "Temperature": 10, "Wind": -5 }...