Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

python - How to test aws lambda functions locally

I have a mobile application backend developed with node.js express. I tried it to deploy it as lambda service. For that I created a Serverless Framework project (https://github.com/serverless). Previously I tested mobile app locally by starting express backend application. Now I can't find a method to test my mobile app locally without local backend. jaws run command only run once I called it.

Is there any method to start the lambda function as a web service? Or is there any alternative to Serverless Framework?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It doesn't look like there's way to do this right now, but version 1.4.0 is about to be released and, among other things, it should include a new command "jaws serve" which should address your problem.

Here's the PR: https://github.com/jaws-framework/JAWS/pull/269

UPDATE: you can now use the new serverless-serve plugin for this.

UPDATE 2: serverless-serve hasn't been updated in a while, it looks like serverless-offline is a much better option now to emulate Lambda functions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...