grunt-aws-lambda icon indicating copy to clipboard operation
grunt-aws-lambda copied to clipboard

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

Open lukas-gitl opened this issue 8 years ago • 3 comments

lukas-gitl avatar Jun 01 '16 01:06 lukas-gitl

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.

Tim-B avatar Jun 01 '16 06:06 Tim-B

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.

lukas-gitl avatar Jun 02 '16 16:06 lukas-gitl

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?

keen99 avatar Oct 19 '16 23:10 keen99