aws-samples / aws-serverless-workshops

Code and walkthrough labs to set up serverless applications for Wild Rydes workshops
http://wildrydes.com
Apache License 2.0
4.2k stars 2.63k forks source link

Error when executing Lambda function #268

Closed kristofrk closed 4 years ago

kristofrk commented 4 years ago

I consistently get the following error when executing the Lambda function (with code directly copied from GitHub). I recopied several times and verified DynamoDB. { "statusCode": 500, "body": "{\"Error\":\"One or more parameter values were invalid: Missing the key RideID in the item\",\"Reference\":\"d8d4f741-b7de-4d8e-a6a7-b6b56340c358\"}", "headers": { "Access-Control-Allow-Origin": "*" } }

wagneraw commented 4 years ago

Take a look at your DynamoDB table, it needs to be created with "RideId" as the partitionkey it looks like your table was created with "RideID" as the partitionkey. Keys in DynamoDB are case sensitive so the code is using "RideId", but your table is "RideID". You could either recreate the table with "RideId" or update the Lambda function code to use "RideID" as the partition key. Let me know if that doesn't solve the issue.

kristofrk commented 4 years ago

Thanks, it solves the problem. Should have been more careful :-)

On Mon, Jan 20, 2020 at 9:06 PM Adam Wagner notifications@github.com wrote:

Take a look at your DynamoDB table, it needs to be created with "RideId" as the partitionkey it looks like your table was created with "RideID" as the partitionkey. Keys in DynamoDB are case sensitive so the code is using "RideId", but your table is "RideID". You could either recreate the table with "RideId" or update the Lambda function code to use "RideID" as the partition key. Let me know if that doesn't solve the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aws-samples/aws-serverless-workshops/issues/268?email_source=notifications&email_token=ABCQDC7F6T5S5LJ7N5VRKKLQ6ZKCRA5CNFSM4KJLDCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJOIB3A#issuecomment-576487660, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCQDC2SAH53FI3IWNJOSDTQ6ZKCRANCNFSM4KJLDCMA .

--

Dr. Kristof Kloeckner 76 Keeler Drive Ridgefield CT 06877

wagneraw commented 4 years ago

It's easy to miss the capitalization, I've seen it come up before :)