Very thankful for the example and made my flask deployment process a lot easier. However, I started facing a lot of issues with package management…
When I went into the logs to check, the message is only limited to around 800 characters. Most of this message shows irrelevant information about AWS Lambda itself. If there could be a longer message in Vercel logs, that would’ve helped me a lot!
Example of something I was facing due to an outdated python package:
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see Managing Lambda runtime version updates - AWS Lambda
[ERROR] Runtime.ImportModuleError: Unable to import module ‘vc__handler__python’: cannot import name ‘Mapping’ from ‘collections’ (/var/lang/lib/python3.12/collections/init.py)
Traceback (most recent call last):