[Docs] DynamoDB Database Integration


#1

Learn how to store user specific data of your Alexa Skills and Google Actions to AWS DynamoDB.


This is a companion discussion topic for the original entry at https://www.jovo.tech/docs/databases/dynamodb

#2

Followed the steps and this is how my app.js looks like :

'use strict';

// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { JovoDebugger } = require('jovo-plugin-debugger');
// const { FileDb } = require('jovo-db-filedb');
const { DynamoDb } = require('jovo-db-dynamodb');

const app = new App();

app.use(
    new Alexa(),
    new GoogleAssistant(),
    new JovoDebugger(),
    // new FileDb(),
    new DynamoDb(),
);

and my config.js looks like this :

// ------------------------------------------------------------------
// APP CONFIGURATION
// ------------------------------------------------------------------

module.exports = {
    logging: true,
 
    intentMap: {
       'AMAZON.StopIntent': 'END',
       'CancelIntent': 'END',
       'AMAZON.YesIntent': 'YesIntent',
       'AMAZON.NoIntent': 'NoIntent',
       'AMAZON.HelpIntent': 'HelpIntent',
       'AMAZON.RepeatIntent': 'RepeatIntent'
    },

    user: {
        context: {
            enabled: true,
            prev: {
                size: 2,
                request: {
                    intent: true,
                    state: true,
                    inputs: true,
                    timestamp: false,
                },
                response: {
                    speech: true,
                    reprompt: true,
                    state: true,
                    output: true,
                },
            },
        },
    },
 
    db: {
        // FileDb: {
        //     pathToFile: '../db/db.json',
        // }
        DynamoDb: {
            tableName: 'User_Session',
        }
    },

    intentsToSkipUnhandled: [
        'END',
        'RepeatIntent',
        'HelpIntent'
    ],
 };

I have hosted my skill on AWS and when I try to invoke it on either platform, it does not work at all.


#3

anyone facing similar issue or can help me identify the issue?


#4

Does your Lambda role have access to DynamoDb?

Learn more here:


#5

Yes. But there were other unrelated issues. Solved, thanks anyway.


#6

Question. Can I use DynamoDB to store data for Google Actions ?