Amplify Lambda Runtime.ImportModuleError:

0

I'm facing the same issue trying to write a lambda function within AWS Amplify.

I coded my lambda using python 3.10, it uses a package that has inner dependencies with:

pydantic==2.5.2
pydantic-core==2.14.5

as per AWS Amplify doc I used pipenv to create Pipfile and Pipfile.lock. I built and deployed the function running amplify push but when I tried to test it I got:

[ERROR] Runtime.ImportModuleError: Unable to import module 'index': No module named 'pydantic_core._pydantic_core' Traceback (most recent call last):

I got the same error running amplify push on macOS and Windows, even if, as expected, Pipfile and Pipfile.lock did not changed.

[Also here]

已提問 5 個月前檢視次數 50 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南