Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot convert undefined or null to object - DynamoDB

Been testing some Lambda functions and finally managed to get the data to push to DyanmoDB, or at least in the logs it shows the billed duration and this only occurs after I've pushed data to the table, doesn't happen before I test the function.

Basically, I'm just testing a small function to push a UserID and Name to a DynamoDB table. I populate the params as seen below.

var UserID = toAdd['UserID']; var Name = toAdd['Name'];

var params = { Item: { 'UserID':UserID, 'Name':Name }, TableName: 'bookings2D' };

When I console log my params I'm seeing this:

params

dynamo.putItem(params, dynamoResultCallback);

And as you can see below, the request is at the very least being triggered.

request

However, when I navigate to my DB Table, and perform a table scan I receive this error:

dynamo error

This only occurs AFTER I run the Lambda function, if I delete and recreate the table this no longer appears. Seems like it's just something small format wise I may not be grasping.

Any help is much appreciated, any questions feel free to ask :)

Thanks

like image 908
Luke Browne Avatar asked Sep 03 '26 10:09

Luke Browne


1 Answers

Hard refresh your browser page using CTRL + F5 or CTRL + Shift + R.

like image 97
Dayamoy Avatar answered Sep 05 '26 06:09

Dayamoy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!