Tim-B / grunt-aws-lambda

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

Added lambda_package option to map files into the zip archive (rename) #81

Open lukas-gitl opened 8 years ago

Tim-B commented 8 years ago

Thanks for the pull request! Would you mind explaining the use case you see for this a little more?

Also, it looks like the unit tests could probably cover a bit more of your new functionality.

lukas-gitl commented 8 years ago

This is to allow for different environment configurations in the packages.

I think this project would benefit from coverage with the tests... It's covered, but hard to see when stuff gets uncovered in the future.

keen99 commented 7 years ago

The use case here, as I see it (and could use it right now) would be to pass different environment configs (or other files or any other reason) into the package deployed.

For example - I want to deploy the "dev" version with the dev.json config file, to function: dev. for "prod" I want to include the prod.json and send that version of the package to function: prod

I need my code to behave differently (talk to different resources, whatever) for different environments.

While I suppose I could package multiple index.js files and set handler: to consume them (I'm speculating), it's a bit less flexible and specific.

@lukas-gitl does that match up with your use case?