簡體   English   中英

如何為本地服務器設置AWS Lambda服務

[英]How to setup AWS Lambda service for a local server

我試圖在本地網絡上為AWS Lambda設置應用程序服務器,這樣應用程序就不必走出互聯網即可執行。 我更喜歡使用linux box,而我的編程環境是Java。

回聲的技巧將執行,然后與本地服務器通信,而不是出入互聯網並與Amazon的應用程序服務器通信。

我的問題是:如何設置應用服務器以處理該技能? 我已經從Amazon完成了該示例,我是否僅需要讓linux框運行Java應用程序,或者設置內容還不止於此? 我看到有AMI(Amazon機器映像),但是我可以在本地部署它們還是僅在AWS控制台上使用?

對此,任何見解都會很棒,謝謝。

因此,這就是echo之間通常的交互方式:

User ---> Echo ---> Skill --->(Internet)Applicaton服務器(我使用的是Amazon托管的AWS lambda)

我想使用:用戶--->回聲->技能->(LAN)應用程序服務器(從未使用過互聯網)。

目前,我已經設置了echo和一項技能,但是LAN上沒有應用服務器。 應用服務器需要什么? 顎和其他東西?

我不確定這個問題是否仍然有用 ,但是我正在使用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 

披露:我是該框架的貢獻者之一

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM