我正在尝试为AWS Lambda设置一个应用服务器,但是在一个本地网络上,这样应用程序就不必到互联网上执行。我更喜欢使用linux盒,我的编程环境是Java。
echo的技能将执行,然后与本地服务器进行通信,而不是出去上网,与Amazon的应用服务器进行通信。
我的问题是:如何设置应用服务器来处理此技能?我已经完成了Amazon的示例,我是否只需要让linux盒运行Java应用程序,或者还有更多的设置呢?我看到了AMIs (),但是我可以在本地部署它们吗?或者它们只用于AWS控制台?
任何对这件事的洞察力都会很好,谢谢。
这就是echo之间通常的交互方式:
用户-->Echo-->技能-->(Internet)应用服务器(我使用的是亚马逊托管的AWS lambda)
我想使用:用户-->Echo-->技能-->(LAN)应用服务器(从未使用过互联网)。
目前,我有设置回声和技能,但没有应用服务器的局域网。应用服务器需要什么?下巴还有别的什么?
发布于 2016-02-04 20:24:43
我不确定这个问题是否仍然相关,但我使用深层框架在本地测试代码并/或将其部署到AWS上。看看这个:
npm install deepify -g
deepify run-lambda --help
run-lambda@1.6.8 - Run Lambda function locally
Usage example: deepify run-lambda path/to/the/lambda -e='{"Name":"John Doe"}'
Arguments:
path: The path to the Lambda (directory of handler itself)
Options:
--event|-e: JSON string used as the Lambda payload
--skip-frontend-build|-f: Skip picking up _build path from the microservices Frontend
--db-server|-l: Local DynamoDB server implementation (ex. LocalDynamo, Dynalite)
--version|-v: Prints command version
--help|-h: Prints command help
另外,您可能需要考虑使用server
选项:
deepify server --help
server@1.6.9 - Run local development server
Usage example: deepify server path/to/web_app -o
Arguments:
path: The path to the Lambda (directory of handler itself)
Options:
--build-path|-b: The path to the build (in order to pick up config)
--skip-frontend-build|-f: Skip picking up _build path from the microservices Frontend
--skip-backend-build|-s: Skip building backend (dependencies installation in Lambdas and linking aws-sdk)
--skip-build-hook|-h: Skip running build hook (hook.build.js)
--port|-p: Port to listen to
--db-server|-l: Local DynamoDB server implementation (ex. LocalDynamo, Dynalite)
--open-browser|-o: Open browser after the server starts
--version|-v: Prints command version
--help|-h: Prints command help
信息披露:我是这个框架的贡献者之一。
https://stackoverflow.com/questions/34710411
复制相似问题