Tim-B / grunt-aws-lambda

A grunt plugin to assist in developing functions for AWS Lambda.
MIT License
247 stars 100 forks source link

Root directory included in zip - not recognized by Amazon #90

Closed rslifka closed 7 years ago

rslifka commented 7 years ago

With the following configuration:

lambda_package: {
  default: {
    options: {
      include_files: ['src/*.js'],
    }
  }
}

...grunt-aws-lambda creates a ZIP file with src at the root, meaning Lambda can't find the files. It looks like someone had a similar issue with archiver - https://github.com/archiverjs/node-archiver/issues/142.

Is there another way I should be specifying or storing my source files? Thanks!!

rslifka commented 7 years ago

Placing index.js in the root of the project, which is convention, makes this work. That's totally fine, would be helpful to have in the docs. Thanks!