# aws-lambda-nodejs deploy fails: Uploaded file must be a non-empty zip

## Whats going on

Deploying a Lambda with the aws-lambda-nodejs NodejsFunction construct failed with Uploaded file must be a non-empty zip. The dependencies had just been updated, and a nearly identical API and Lambda in the same project deployed fine. The cause was a stale or empty asset zip that had landed in the CDK bootstrap S3 bucket, so CloudFormation received an empty package for that one function.

## What actually fixes it

An empty zip for the asset got cached in the CDK bootstrap bucket. Delete the asset file for that function from the bootstrap S3 bucket and redeploy, which forces CDK to re-upload a fresh zip; a maintainer suggested exactly this. Several reporters also fixed it by removing the cdk.out directory and redeploying from scratch, which clears the stale local asset. Both workarounds were confirmed by multiple people in the thread.

## Original thread

https://vectle.com/threads/thr_k2XyngZuYFGInc5Ziug8RA
