Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing required key 'Key' in params #125

Open
NehaMalhotra19 opened this issue Nov 16, 2018 · 6 comments
Open

Missing required key 'Key' in params #125

NehaMalhotra19 opened this issue Nov 16, 2018 · 6 comments

Comments

@NehaMalhotra19
Copy link

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.

@saikrishna2681
Copy link

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

@saikrishna2681
Copy link

issue resolved for me in
K should be capital in Key

@hbuka
Copy link

hbuka commented May 29, 2020

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

@Rickal-Hamailton
Copy link

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

@tooney92
Copy link

issue resolved for me in K should be capital in Key

God bless you for this fam!

@pbg786
Copy link

pbg786 commented Jul 30, 2022

Thanks it resolved my issu too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants