3 ms·
Depends on your use case and what language you are currently using. We are using nodejs and have built our own collection of libraries: https://github.com/Mitoc
by eistrati 11y ago
Depends on your use case and what language you are currently using. We are using nodejs and have built our own collection of libraries: https://github.com/MitocGroup/deep-framework https://github.com/MitocGroup/deep-framework
And here is an example: https://github.com/MitocGroup/deep-microservices-todo-app https://github.com/MitocGroup/deep-microservices-todo-app
Based on our experience, currently AWS Lambda is amazing for data / content / asset management use cases. Cold start is a known issue, which I hope AWS will solve sooner rather than later, because a lot of customers are complaining about it ;)
- smt88 11y agoHow is the 0.10.x version of Node treating you? That's what's keeping me off of Lambda at the moment. I guess I could use Babel before deployment, but what about external libs? I'm thinking of the following workflow: 1. Write/debug with TypeScript -> ES6 on Node 5 2. Compile to a single file (not sure if I can use tsc or Babel for this -- basically just inline all the imports) 3. Transpile the resulting single file to ES5 I'm not sure if it's going to work, though...
- eistrati 11y agoI'll be honest, performance is not the best one :) That's why for the time being, we're using a combination of Lambda with ECS. Please don't quote me on that, but I have a feeling that by the time we're building the work-arounds, mine and your problems will be solved by the services ;)
- eistrati 11y agoHere is a practical approach, how we do it: 1. We write everything in ES6, following code styling from Airbnb - https://github.com/MitocGroup/javascript https://github.com/MitocGroup/javascript 2. Every Lambda is separate npm package, therefore npm is managing all the dependencies; We include node_modules folder into the .zip file and upload it to AWS 3. Using Babel, transpile ES6 to ES5 - https://github.com/MitocGroup/deep-microservices-todo-app/blob/master/src/DeepNgToDo/Backend/src/Todo/Create/package.json#L25 https://github.com/MitocGroup/deep-microservices-todo-app/bl... 4. To support 0.10.x, we're requiring Babel Polyfill - https://github.com/MitocGroup/deep-microservices-todo-app/blob/master/src/DeepNgToDo/Backend/src/Todo/Create/bootstrap.es6#L4 https://github.com/MitocGroup/deep-microservices-todo-app/bl... As anticipated, the performance is not the best one, but functional for some of our use cases where time is not a constrain. That's why the combination with Amazon ECS is perfect complimentary match when AWS Lambda doesn't perform well, as required by the application.
- smt88 11y agoThanks so much for posting this! I was really curious and found this to be helpful.
- abrookewood 11y agoYes, cold start (the delay you experience when your code hasn't been used in a while) is a big issue - it means serious additional latency which makes Lambda difficult to use for end-user facing applications. You can get around this by calling the code periodically .. but that defeats the purpose. There are also restrictions around how long your code can run. BUT, if your use case fits within these constraints, it's pretty cool to just deploy your code and forget about all of the administration hassles associated with running it on a server.