5 ms·
Show HN: Claudia.js – deploy Node.js microservices to AWS more easily
- idbehold 11y agoThis is really handy! Although what I really need is a service that, given a URI to a GIT repo, will clone the repo, `npm install --production`, browserify (and maybe uglify) the main file specified in the package.json, and return the output. At the very least I wish AWS would update the version of Node.js that Lambda uses and maybe provide the "request" NPM package by default (yes, I'd like my HTTP requests to follow redirects automatically thank you).
- rco8786 11y agoThat first part can be done in about 5 lines in a shell script
- deleted 11y ago[deleted]
- reimertz 11y agoyou should look at https://hook.io/reimertz?s https://hook.io/reimertz?s
- zbjornson 11y agoI made a deploy task (wrappable with gulp) and example Lambda function that efficiently runs any specified version of nodejs. Looks less polished than the OP's tool but we've used it in production for about six months. https://github.com/zbjornson/lambda-deploy https://github.com/zbjornson/lambda-deploy
- nthj 11y agoNice! I had the same pain point and worked something up a few weekends ago. [1] I may look into integrating some of my ideas into Claudia.js, although "I like CoffeeScript" may not be in line with where the author is headed. Most of my efforts went into integrating Amazon's Key Management Service into the local development and S3 deployment process. (One of the first Lambda functions I wanted needed to talk with GitHub, Slack and some other APIs, so encryption of access tokens seemed a given.) I'd be curious if the author has run into this situation or already had thoughts about how to approach this. [1] https://github.com/twobyfourio/cheese-grater https://github.com/twobyfourio/cheese-grater
- adzicg 11y agoauthor here... I have nothing against CoffeeScript, so that's not really a blocker. For access keys, so far I stored them as stage variables in the API Gateway config. Claudia adds all stage variables to the env key of the request passed to the Node.js handler. That way, they are instantly available to your function, but never shared with Web clients. I'm not entirely sure how secure this is, but the use cases I used it for are not highly risky. This is, I imagine, equivalent to storing them in the ENV variables for heroku services. (what I migrated from) one additional benefit of stage vars is that you can use different values for production, dev and testing, and it all works out of the box.
- southpolesteve 11y agoSo for Shepherd (https://github.com/bustlelabs/shepherd https://github.com/bustlelabs/shepherd) we copy in an env.js file on deployment to lambda that has all the env variables. Stage Variables are good, but there is a gotcha. If you are using them to establish connections (external service, DB, etc) you only get access to them inside the function body. Might not be the biggest issue for some people but I like to have everything loaded and connections established when the lambda function is loaded by the AWS parent process rather than on actual function execution.
- manyxcxi 11y agoI like that the name Cheese Grater gets clarified with the README and I instantly got it and chuckled. One thing I've been trying to figure out is how to inject secrets into my lambda packages so I don't have to have them checked into Git, but also using the right secrets based on an application environment. Although once they make Lambdas available inside of VPCs I'd be able to do away with a lot of it by a using roles.
- Mizza 11y agoSo this is like Zappa[1] for Node.js apps? Cool! [1] https://github.com/Miserlou/Zappa https://github.com/Miserlou/Zappa
- Rauchg 11y agoCheck out Micro as well: https://github.com/zeithq/micro https://github.com/zeithq/micro. It's also oriented around single-purpose (single-function) microservices, but pure HTTP.
- manojlds 11y agoOnly tangentially related, as this is about using AWS Lambda.
- STRiDEX 11y agoApex from @TJ is similar https://github.com/apex/apex https://github.com/apex/apex
- purplerabbit 11y ago+1 for Apex. It's super simple, and keeps other language options open...
- manojlds 11y agoWithout me having to dig into code, what is this about shim to run Golang on Lambda?
- robterrell 11y agoYou can run a node script that runs a golang executable. You just have to pack the go exe into the zip bundle.
- southpolesteve 11y agoApex is awesome if you just need AWS Lambda. Its not so great if you need integration with API Gateway. Because of AWS's quirky IAM roles and permissions, you really need a tool that links everything up properly during deployment.
- southpolesteve 11y agoI'm working on something similar: https://github.com/bustlelabs/shepherd https://github.com/bustlelabs/shepherd It aims to be simpler than Serverless, but still maintain great integration with API Gateway. Lots of cool project in the space right now! Check em all out. I'll be sure to add yours to Shepherd's "Other Project" section.
- ac360 11y agoCheck out the Serverless Framework if you are looking to build entire applications on lambda - http://www.serverless.com http://www.serverless.com