1

I am trying to setup an application server for AWS Lambda but on a local network so that an application won't have to go out to the internet to execute. I would prefer to use a linux box and my programming environment is Java.

The skill from the echo will execute and then communicate with the local server rather than going out to the internet and communicating with Amazon's application server.

My question is this: How do I setup the application server to handle the skill? I've done the example from Amazon, do I only need to have the linux box run the Java application or is there more to the setup than that? I see there are AMIs (Amazon Machine Images) but can I deploy those locally or are they only for use on the AWS console?

Any insight into this would be great, thank you.

So this is how usual interaction between echo works:

User--->Echo--->Skill--->(Internet)Applicaton server (I'm using Amazon hosted AWS lambda)

I would like to use : User--->Echo--->Skill--->(LAN)Application server (without ever using the internet).

Currently I have setup echo and a skill but no application server on the LAN. What do I need for the application server? JAWS and something else?

allegory
  • 124
  • 1
  • 1
  • 10
  • 1
    Possible duplicate of [How to test aws lambda functions locally](http://stackoverflow.com/questions/33884968/how-to-test-aws-lambda-functions-locally) – Hendrik Jander Jan 10 '16 at 20:39
  • Check the possible duplicate question ^ for an answer. It's not immediately clear exactly what you're trying to do. But perhaps setting up an API Gateway get/post access that calls your Lambda function is what you're looking for? If you do this you can call your function from any server, whether local or not (assuming the right permissions). – JohnAllen Jan 10 '16 at 22:27
  • I want to develop an app/skill for the echo (not test). But i don't want to use aws from amazon. They have their own web service but I want to setup my own server I can deploy locally (not over the internet). I am looking into that link you posted thank you. But I'm just a little worried as its just to test. – allegory Jan 10 '16 at 22:37
  • So just write and use your app locally and setup an API access point using the AWS API Gateway. Seems like that should work. – JohnAllen Jan 10 '16 at 22:39
  • So the skill I make on the developer portal will point to the aws api gateway on my LAN? – allegory Jan 10 '16 at 22:42
  • The gateway says its a front door, would I need anything else for this setup to work? – allegory Jan 10 '16 at 22:56

1 Answers1

0

I'm not sure if this question is still relevant or not, but I'm using DEEP Framework to test the code locally and/or deploy it on AWS Lambda. Check this out:

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

Also, you might want consider using the server option:

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 

Disclosure: I am one of the contributors to this framework

eistrati
  • 2,314
  • 6
  • 26
  • 35