App Configuration > Server > AWS Lambda
AWS Lambda is a serverless hosting solution by Amazon Web Services. Find the official documentation here.
Here is how the part of index.js
, which is used to run the app on AWS Lambda, looks like:
'use strict';
const {app} = require('./app/app.js');
exports.handler = (event, context, callback) => {
app.handleLambda(event, context, callback);
};
While for Alexa, the process of hosting a Skill on Lambda is straightforward, for a Google Action there are additional steps that need to be taken to create an API Gateway. To learn more about how to run your voice app on Lambda, please take a look at our step-by-step tutorials:
The FilePersistence database integration does not work on AWS Lambda. It is encouraged to switch to DynamoDB before uploading to Lambda.
If your tell
or ask
responses aren't firing inside callbacks or promises on Lambda, try to add the following to your exports.handler
:
context.callbackWaitsForEmptyEventLoop = false;