如何为本地服务器设置AWS Lambda服务



我正试图在本地网络上为AWS Lambda设置一个应用程序服务器,这样应用程序就不必在互联网上执行。我更喜欢使用linux盒子,我的编程环境是Java。

echo的技能将执行,然后与本地服务器通信,而不是去互联网上与亚马逊的应用服务器通信。

我的问题是:如何设置应用程序服务器来处理该技能?我已经在亚马逊上做了这个例子,我只需要让linux盒子运行Java应用程序,还是需要更多的设置?我看到有AMI(亚马逊机器图像),但我可以在本地部署它们吗?还是它们只在AWS控制台上使用?

任何对此的见解都将是伟大的,谢谢。

这就是回声之间通常的交互作用:

用户--->Echo--->Skill--->(互联网)应用程序服务器(我使用的是亚马逊托管的AWS lambda)

我想使用:用户--->Echo--->Skill--->(局域网)应用服务器(从未使用过互联网)。

目前,我有设置回声和技能,但没有应用程序服务器上的局域网。应用程序服务器需要什么?下巴和其他什么?

我不确定这个问题是否仍然相关,但我正在使用DEEP Framework在本地测试代码和/或将其部署在AWS Lambda上。看看这个:

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 

披露:我是这个框架的贡献者之一

最新更新