1

I am creating a chatbot using python, and I was trying to create a API endpoint to get AI responses. I uploaded the code to AWS lambda functions by creating a function and used AWS lambda layers to upload the dependencies (I made sure to match de "python/deps" format). The dependencies are:

boto3 python-dotenv openai pydantic fastapi uvicorn mangum 

The problem is, when I try to test the code, it gives me this error:

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named '_typeshed' 

I tried adding this dependency to the list: typing_extensions

Since Claude told me it may help. It didn't.

Could someone help me please?

2

1 Answer 1

0

Double-check that your filename is lambda_function.py and the function name in there is lambda_handler or set the handler name explicitly after creating the function.

Also check that you zip the content of the directory but not the directory. And also check the permissions of zipped file, it should be at least chmod 444

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.