Modify your Lambda function to throw an erro and then deploy and invoke it. Check the Lambda monitoring web console and CloudWatch logs to see how they captured the error information.
Start tailing the remote logs then fix and deploy the function again. Reload the API web page to invoke the function again and confirm that the fix works in the logs.
Set up CFN Lint for your favourite code editor then break the template and see how the error gets highlighted.