For me it worked when I renamed my main.py file to lambda_function.pyinside the root folder of output code directory.
lambda_function.py