How can I create deployment package for my lambda to work with my libraries or an alternative solution?

0

I'm receiving error: Receive error in Lambda: Unable to import module 'functions': No module named 'functions' Traceback

code: Code.fromAsset(path.resolve(__dirname, BundleLocation + name)),

I'm deployig this via the CDK. I confirmed I have this in my code for CDK for my Lambda; however I am still receiving an error. However, when I go into Lambda to troubleshoot why my app is not working I see logs in CloudWatch and I look through Cloudwatch logs and I am receiving this error.

I also want to note my CDK stack is in typescript and my python code is in python. I'm not sure if this makes a difference. Does anyone know what could cause this error after me detailing I have the correct syntax?

Also is there any work arounds for this?

1개 답변
0
profile picture
전문가
답변함 일 년 전
  • Yes, I have looked at this first.

    I also do not need lambda layer for this as this will be in one region.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠