amazon-web-services


Add information into DynamoDB using Alexa Lambda function


I've been stuck on this code for about a day now. I am just trying to add information into DynamoDB through a launch request using Alexa. I get the following error code:
"errorMessage": "RequestId: f96ae2cb-1dbf-11e7-a267-b7cf2f2c95a0 Process exited before completing request"
The information actually gets inserted into DynamoDB, but I can't add more functions to the program because of the error. From what I understand, it may be a problem with the callback. I have tried many different ways to "callback" or return something, but I haven't figured out how to avoid the error. If I uncomment this.emit(':tell', "Hello, inserting Apples into DynamoDB"); the error goes away, but no information gets inserted. Any help is REALLY APPRECIATED!! (Code below)
'use strict';
var Alexa = require('alexa-sdk');
const doc = require('dynamodb-doc');
const dynamo = new doc.DynamoDB();
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
var handlers = {
'LaunchRequest': function(event, context, callback) {
// this.emit(':tell', "Hello, inserting Apples into DynamoDB");
var params = {
Item: {
date: Date.now(),
message: "Apples"
},
TableName: '_yourTableName'
};
dynamo.putItem(params, function(err, data){
if(err){
callback(err,null);
}
else{
callback(null,data);
}
});
context.done();
}
};

Related Links

get personal Amazon purchase history and simiar titles
Are there databases which work like Amazon SimpleDB which can be run locally?
AWS ElasticBeanstalk in a production environment
SNS topic not publishing to SQS
how do i to forward domain.com to www.domain.com at godaddy for s3 hosted site?
On Amazon EC2, will the Spot Instance price ever be higher than the On-Demand Price?
search movie link in amazon api
Best way to manage code changes for application in Amazon EC2 with Auto Scaling
Can Amazon RDS Small do 200 timestamp updates on a primary key per second?
Amazon S3 link expiration during download?
How to restrict folders to user
How does the Amazon CloudWatch work?
What do I need to do to move my AWS EC2 AMIs from EU to US region?
Amazon RDS: Custom resolv.conf within EC2 breaks connectivity
Comparision between Amazon web services (AWS) or Rackspace cloud servers? [closed]
How can i query to get the multiple values in SimpleDB (AWS)

Categories

HOME
elasticsearch
libgdx
memory
windows-10
ews
braintree
autocomplete
portable-class-library
header
flurry
dji-sdk
stored-procedures
sharepoint-online
driver
game-maker
user-defined-types
renderscript
amazon-mws
opam
android-permissions
pst
fido-u2f
websphere-portal
jpa-2.1
unordered-multimap
ruby-daemons
oracleforms
react-bootstrap-table
pyspark-sql
amazon-iam
epplus
listjs
cloudera-manager
adminer
cups
love2d
code-rally
uivisualeffectview
cloudera-quickstart-vm
elastica
classnotfoundexception
git-tfs
doctrine-extensions
rightnow-crm
sony-future-lab-n
nusoap
android-webservice
winmerge
mobile-angular-ui
yui3
s-function
dcount
data-management
system.net.mail
dojo-build
bbc-micro
unsigned
ajaxmin
android-syncadapter
preferenceactivity
wif4.5
json-spirit
decidable
dnx50
featuretoggle
modern.ie
mobilefirst-server
wicked-gem
whitespace-language
fuseesb
android-audiomanager
dos2unix
qt5.4
storing-data
back
visual-c++-2012
rpg
mfmessagecomposeview
csslint
redpitaya
accountmanager
xsd2code
hints
statechart
background-thread
red-system
playorm
prototypal-inheritance
netstream
multidrop-bus
delphi-prism
play2-mini
office-automation
photo-management
asp.net-mvc-views
mygeneration
uninstaller
activestate
tacit-programming
index.dat
word-automation
parentid

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App