[Tutorial] Host your Google Action on AWS Lambda


#1

AWS Lambda is a serverless hosting solution by Amazon. Many Alexa Skills are hosted on this platform, thus it might make sense for you to host your cross-platform voice application (including your Google Action). This is what we're going to do in this section. This usually takes a few steps, so be prepared.


This is a companion discussion topic for the original entry at https://www.jovo.tech/tutorials/host-google-action-on-lambda

#2

The is runtime handler error


#3

Hi. Could you further elaborate what error you’re getting? Do you have any error logs you can provide?


#4

{
“errorType”: “Runtime.HandlerNotFound”,
“errorMessage”: “index.handler is undefined or not exported”,
“trace”: [
“Runtime.HandlerNotFound: index.handler is undefined or not exported”,
" at Object.module.exports.load (/var/runtime/UserFunction.js:144:11)",
" at Object. (/var/runtime/index.js:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:1156:30)",
" at Object.Module._extensions…js (internal/modules/cjs/loader.js:1176:10)",
" at Module.load (internal/modules/cjs/loader.js:1000:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:899:14)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)",
" at internal/main/run_main_module.js:18:47"
]
}


#5

Trying this myself – though the fact that there’s been no response in over a year makes me nervous. Tried to follow the instructions, but so far Google just told me “Sorry, I don’t understand”.

Looking at the jovo deploy, I see

  √ Deploying Google Action
    ↓ Creating file /googleAction/dialogflow_agent.zip [skipped]
      → Fulfillment Endpoint: undefined

which seems to suggest that I should be adding my API gateway’s URI to the project.js file so it can be configured automagically. Is that correct, and if so what’s the syntax? I currently have

   googleAction: {
       nlu: 'dialogflow', // Disable this to try using Conversational Actions
       projectId: `new-sounds-on-demand`,
   },
    host: {
	lambda: {
            arn: 'arn:aws:lambda:us-east-1:046935287063:function:prod-new-sounds-on-demand',
            askProfile: 'admin', // if left out: "default" profile is used
	}
    }