I am having a chalice app which exposes some urls backed by api gateway and lambda function. What I want is to log the request id with each and every log msg for debugging purposes. Below is how my code looks like.
@app.route('/instrument', methods=['GET'])
@logging_and_error_handling()
def get_instrument_value():
// some code
// logger.log() Here I want to put the request id.
I can see that request id is getting logged in the cloudwatch by default. I want to use the same request id. How do I capture it inside my method ?