Error when testing Lambda: "Lambda was not able to unzip the file"

0

After uploading a .zip containing code for my Lambda, I tried to test it using Lambda's built-in testing functionality. However, I get the following error:

Calling the invoke API action failed with this message: Lambda was not able to unzip the file

I can unzip the file locally with unzip lambda.zip, and running unzip -l lambda.zip shows that it contains the a handler.js as expected. I can even view the source code for the Lambda in the AWS console on the Lambda's Code tab.

It seems as though the Lambda runtime might be using a different (and broken?) way of decompressing ZIP archives?

질문됨 일 년 전1024회 조회
2개 답변
0

How large is your ZIP file? If it is more than 50 MB (compressed) or 250 MB (uncompressed) it exceeds the service limits. If you are exceeding that size, consider using a container image.

profile pictureAWS
전문가
답변함 일 년 전
0

That can be cause of size , as i just one time saw this error 5 years ago when packaging a large bundle which was self contained and larger that 250 MB unzipped , but i compressed that as 45M but i got this error

Check if you are not zipping the node_modules , or other heacy bundles

also verify if it s a real zip file

답변함 일 년 전

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

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

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

관련 콘텐츠