Ezra Henley
Ezra Henley

Reputation: 339

Lambda function works in Lambda console but not in Test Simulator (Beta)

I have an issue where my lambda function is working when I run a test in the Lambda console but not when I run that same code in the Test Simulator (Beta). The following is what I'm putting into both places, with redactions for sensitive information:

{
"version": "1.0",
"session": {
    "new": false,
    "sessionId": "xxxxx",
    "application": {
        "applicationId": "xxxxx"
    },
    "user": {
        "userId": "xxxxx"
    }
},
"context": {
    "AudioPlayer": {
        "playerActivity": "IDLE"
    },
    "Display": {
        "token": ""
    },
    "System": {
        "application": {
            "applicationId": "xxxxx"
        },
        "user": {
            "userId": "xxxxx"
        },
        "device": {
            "deviceId": "xxxxx",
            "supportedInterfaces": {
                "AudioPlayer": {},
                "Display": {
                    "templateVersion": "1.0",
                    "markupVersion": "1.0"
                }
            }
        },
        "apiEndpoint": "https://api.amazonalexa.com",
        "apiAccessToken": "xxxxx"
    }
},
"request": {
    "type": "IntentRequest",
    "requestId": "xxxxx",
    "timestamp": "2018-02-13T05:22:11Z",
    "locale": "en-US",
    "intent": {
        "name": "OpenTicketIntent",
        "confirmationStatus": "NONE",
        "slots": {
            "Project": {
                "name": "Project",
                "confirmationStatus": "NONE"
            },
            "Assignee": {
                "name": "Assignee",
                "confirmationStatus": "NONE"
            },
            "TicketType": {
                "name": "TicketType",
                "value": "bug",
                "resolutions": {
                    "resolutionsPerAuthority": [
                        {
                            "authority": "xxxxx",
                            "status": {
                                "code": "ER_SUCCESS_MATCH"
                            },
                            "values": [
                                {
                                    "value": {
                                        "name": "Bug",
                                        "id": "xxxxx"
                                    }
                                }
                            ]
                        }
                    ]
                },
                "confirmationStatus": "NONE"
            },
            "IssueTitle": {
                "name": "IssueTitle",
                "confirmationStatus": "NONE"
            }
        }
    },
    "dialogState": "STARTED"
}

}

When I ask my skill to open itself in the simulator it opens perfectly. I get the correct response. But when I ask it a question afterwards ("Open a bug", and many variations that I have in my dialog model) I'm getting "There was a problem with the requested skill's response". Am I doing something wrong? Will this not work unless I'm using a physical device?

Upvotes: 1

Views: 772

Answers (1)

maegnes
maegnes

Reputation: 11

regarding any issues with your lambda function, you should check the log files of your lambda function.

  1. Select your lambda function in the Lambda Management Console
  2. Click "Monitoring" (besides the tab "Configuration")
  3. On the right side, you can see the box "Invocation Errors". Inside the box, click "Jump to logs"

You will then be redirected to the latest log file of your lambda function. I think you either will be able to solve the issue on your own or provide additional infos on the error to us.

Cheers, Magnus

Upvotes: 1

Related Questions