MathieuLoutre / grunt-aws-s3

Grunt plugin to interact with AWS S3 using the AWS SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing required key 'Key' in params

NehaMalhotra19 opened this issue · 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.

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

issue resolved for me in
K should be capital in Key

commented

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

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

issue resolved for me in K should be capital in Key

God bless you for this fam!

Thanks it resolved my issu too