motdotla / node-lambda-template Goto Github PK
View Code? Open in Web Editor NEWThe bare minimum for a node.js app running on Amazon Lambda.
The bare minimum for a node.js app running on Amazon Lambda.
Default project builds dependencies of node-lambda into lambda zipfile. Hello world now carries commander
, graceful-readlink
, sax
, xml2js
, xmlbuilder
, etc. ~771k of deps.
New project maintainer closed the original #4 because he misunderstands it. I was trying to explain but he locked the issue because I asked him to not close it.
The actual problem is not that node-lambda
builds things in because they're in use; it's that node-lambda-template
is incorrectly propositioning its own tools as part of the downstream build.
This is a problem in the template, despite that the new maintainer closed an issue while the issue's creator was trying to explain what they misunderstood.
@motdotla - please help with the overly aggressive new issue burying mod, thanks
Hi.
Firstly - thanks for the awesome repo.
I see there are a few PRs piling up regarding updating the version of node-lambda
referenced
in package.json
.
As of my writing, the current version is 0.8.13, which obviates both PRs.
So - I'm hoping this issue can be a stand-in to update to latest, whatever it is when you take on the work. Since this app is a many people's first brush with using node-lambda
, it would be nice if running node-lambda setup
wrote the newest version of .env
.
Thanks again for your work.
It happens to me when the logs didn't show up as expected after I installed a few dependencies and the size of the folder increased quite a bit. After a few trials and errors it turned out that 'npm run test' and 'node-lambda run' were indeed giving different outputs. I am not sure why but I think that this bug might not be worth fixing. It might be better to just let the users to use the node-lambda cli commands.
I'd love to be able to use your project to run Lambda functions. Unfortunately, I'm getting stuck at the initial steps. I'm hoping you wouldn't mind providing a hint to get me past a roadblock.
I've tried to create a AWS user, role, and policy to allow node-lambda to work. When I try using node-lambda to deploy the node-lambda-template, I see this error:
[/_/Workspace/gits/node-lambda-template]$ ./node_modules/.bin/node-lambda deploy [master]
Generating zip file
Reading zip file to memory
Uploading zip file to AWS Lambda with parameters:
{ FunctionName: 'tutorial-development',
FunctionZip: <Buffer 50 4b 03 04 14 00 00 00 08 00 29 17 99 46 a9 f3 94 05 8e 00 00 00 4b 01 00 00 08 00 1c 00 69 6e 64 65 78 2e 6a 73 55 54 09 00 03 cd 3a 3b 55 d1 3a 3b 55 ...>,
Handler: 'index.handler',
Mode: 'event',
Role: 'lambda_basic_execution',
Runtime: 'nodejs',
Description: '',
MemorySize: '128',
Timeout: '3' }
{ [ValidationException: 1 validation error detected: Value 'lambda_basic_execution' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+]
message: '1 validation error detected: Value \'lambda_basic_execution\' at \'role\' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+',
code: 'ValidationException',
time: Sat Apr 25 2015 03:15:57 GMT-0400 (EDT),
statusCode: 400,
retryable: false,
retryDelay: 30 }
Here is a screenshot of my AWS setting for a user 'node-lambda' that I created for using your project:
Do you have any advice for me?
Now that AWS Lambda Node.js 0.10 has been officially deprecated, I think we should update the index.js to something like this:
exports.handler = function( event, context, callback ) {
console.log( "Running index.handler" );
console.log( "==================================");
console.log( "event", event );
console.log( "==================================");
console.log( "Stopping index.handler" );
callback(null, data);
}
Ref: https://aws.amazon.com/blogs/compute/node-js-4-3-2-runtime-now-available-on-lambda/
Default project builds dependencies of node-lambda into lambda zipfile. Hello world now carries commander
, graceful-readlink
, sax
, xml2js
, xmlbuilder
, etc. ~771k of deps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.