其他分享
首页 > 其他分享> > [AWS] Solve Error: Uploaded file must be a non-empty zip

[AWS] Solve Error: Uploaded file must be a non-empty zip

作者:互联网

 

If you got the following error when run the sam deploy :

 

CREATE_FAILED AWS::Lambda::Function <YourFunctionName> Resource handler
Function returned message:
"Uploaded file must be
a non-empty zip
(Service: Lambda,
Status Code: 400,
Request ID: <YourRequestID>, Extended Request
ID: null)"
(RequestToken: <YourRequestToken>,
HandlerErrorCode:
InvalidRequest)

 

It might be the node version issue, the CDK bug is #12536 and the upstream NodeJS bug is #37027

Try to change the node version to older than v15.5.0 to mitigate this issue:

 

nvm list
nvm use <Older Version>

 

标签:Uploaded,non,zip,AWS,version,file,bug
来源: https://www.cnblogs.com/grandyang/p/15432999.html