grunt-aws-s3 icon indicating copy to clipboard operation
grunt-aws-s3 copied to clipboard

Missing required key 'Key' in params

Open NehaMalhotra19 opened this issue 6 years ago • 6 comments

const AWS = require('aws-sdk'); var docClient = new AWS.DynamoDB.DocumentClient();

var tableName = "TravBudgInfoDB";

exports.handler = (event, context, callback) => { console.log(event.EmailID)

var params = { TableName : tableName, key:{
"EmailID" : event.EmailID } }

docClient.get(params, function(err,data){ callback (err, data);

})

};

I wrote the above code in Lambdafunction and I am getting the below error:

errorMessage": "Missing required key 'Key' in params", "errorType": "MissingRequiredParameter", "stackTrace": [ "ParamValidator.fail (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:50:37)", "ParamValidator.validateStructure (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:61:14)", "ParamValidator.validateMember (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:88:21)", "ParamValidator.validate (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:34:10)", "Request.VALIDATE_PARAMETERS (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:125:42)", "Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)",

Could anyone please help me in it.

NehaMalhotra19 avatar Nov 16 '18 13:11 NehaMalhotra19

Hi i am also getting the same issue, could you please let me know how to resolve this issue, thanks in advance

saikrishna2681 avatar Mar 09 '19 10:03 saikrishna2681

issue resolved for me in K should be capital in Key

saikrishna2681 avatar Mar 09 '19 11:03 saikrishna2681

Thank you for the tip, K in CAP fixed the issue for me too.

hbuka avatar May 29 '20 04:05 hbuka

WHATTTTT lmao a capital K was the issue omg the struggles continue.

Rickal-Hamailton avatar Aug 23 '21 15:08 Rickal-Hamailton

issue resolved for me in K should be capital in Key

God bless you for this fam!

tooney92 avatar Feb 17 '22 13:02 tooney92

Thanks it resolved my issu too

pbg786 avatar Jul 30 '22 15:07 pbg786