Python Lambda debugging notes

No output?

If your script is failing but doesn’t print any errors try adding this to the script and redeploying it:

import logging

This should print up error messages that happen when the function is initialized.

ValueError: Required parameter name not set

It is likely that in your initialization, outside of your handler, there is some code that’s trying to read an environment variable that’s not set. Check the spelling and capitalization of any environment variables you use. To be extra sure you’ve got it right you can dump them on startup like this:

import os