5 ms·
How does one version control the scripts and easily deploy them? How does one test them on one's own computer when developing them? Must the scripts be uploaded
by epoch1970 11y ago
How does one version control the scripts and easily deploy them? How does one test them on one's own computer when developing them? Must the scripts be uploaded into AWS after every change if testing is to be done?
- alexbilbie 11y agoIt's very easy to test scripts locally - here's my quick and dirty SNS->lambda tester script - https://gist.github.com/alexbilbie/cd1a1309bd7267d860b0 https://gist.github.com/alexbilbie/cd1a1309bd7267d860b0 Deployment is easy too; I've got a two line bash script that zips the code then uploads it using the AWS CLI. Versioning documentation can be found here - http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html http://docs.aws.amazon.com/lambda/latest/dg/versioning-alias...
- daviding 11y agoI use this to run/test locally, and then deploy. I also upload binaries, so do use the AWS upload but it's quick via a script within the deploy helpers. https://github.com/motdotla/node-lambda https://github.com/motdotla/node-lambda
- robterrell 11y agoI spent my last week figuring this out. I tried several of the open source packages mentioned above including jaws and node-lambda. In the end, I use node-lambda for local testing. If you configure your package.json file correctly you can get VS Code to run and debug, which was a life-changer for me. However, "node-lambda deploy" was breaking something between the API Gateway and Lambda, so eventually I switched to using a package.json deploy script that uses the AWS command line to zip & upload the working directory.