3 ms·
Have you tried using serverless/serverless-offline? https://www.serverless.com/ https://www.serverless.com/
by fifthofeight 5y ago
Have you tried using serverless/serverless-offline? https://www.serverless.com/ https://www.serverless.com/
- cosmotic 5y agoOur team has; it's been very difficult. Our jenkins build agent (running as a container) runs integration tests that start a node+serverless container, that starts a localstack container, that starts a lambda contianer.
- tdfirth 5y agoI haven't tried it yet, no. It always struck me as being focused on making deployment quick/easy rather than on creating a good local dev workflow (i.e. the same workflow I currently have but a quicker cycle time). This never really appealed to me. Cosmotic's comment kind of confirms my suspicions to be honest.
- jppope 5y agoCouple of notes I'd like to throw out there... - The Serverless Framework does help ease quite a few of your concerns, local development is made much easier (they have a node server for js development). The company working on it is kinda funny, but I still think it's a good tool. I currently use the raw lambda environment at work and can say that the serverless framework is a valuable abstraction. - I think Cosmotic is making their deployment setup more complicated than it needs to be. I obviously don't know their use case but there are easier ways to accomplish a CICD w/ FaaS... - I would recommend trying it. Its pretty painless, and you'll know within ~2-4 hours whether or not it will work for you
- notsureaboutpg 5y agoWas going to post this. It's not a first-class experience, but you can get into a groove with it and for 90% of projects (which need sparing use of Lambda functions for specific purposes). As an example, I use Hasura for some of my backends, and it requires you to set up authentication somewhere else (e.g. Auth0). I usually set up a JWT based authentication module on AWS lambda that works specifically for the given project, and I use serverless to get that done pretty quickly.
- anfrank 5y agoIt's quite limiting on: 1. It only mocks API Gateway, and not accurately (ie. IAM permissions). You also need to use a bunch of other similar plugins to mock DynamoDB, SNS, SQS, etc. 2. You need to change your code (wrapping your aws-sdk to connect to localhost) to use these mocking plugins. I posted elsewhere in this thread but checkout SST (https://github.com/serverless-stack/serverless-stack https://github.com/serverless-stack/serverless-stack), it lets’ you work on your Lambda functions live without having to mock AWS services locally. Here’s a short demo (https://youtu.be/hnTSTm5n11g https://youtu.be/hnTSTm5n11g)