

AWS DynamoDB error: ValidationException: One or more parameter values were inval...
source link: https://www.kevinhooke.com/2022/11/15/aws-dynamodb-error-validationexception-one-or-more-parameter-values-were-invalid-condition-parameter-type-does-not-match-schema-type/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

AWS DynamoDB error: ValidationException: One or more parameter values were invalid: Condition parameter type does not match schema type
Executing a query against a Global Secondary Index I got this error:
ValidationException: One or more parameter values were invalid: Condition parameter type does not match schema type
Using the NodeJS Document api, my query looked like this:
let params = { "TableName": "exampletable", "IndexName": "example-createdate-index", "KeyConditionExpression": "exampleattr1 = :exampleattr1", "ExpressionAttributeValues": { ":exampleattr1": { "S": "0" } }, "ProjectionExpression": "createdate, exampletext", "ScanIndexForward": false } return docClient.query(params).promise();
The error is saying that one of my query parameter types does not match the values in the schema. I know this value is a String so this looks correct. Following recommendations on this question, it’s suggested to not pass the param type as “S” and let the Document api work out the type itself.Remove the “S” and just passed the value and now it’s working as expected.
CategoriesKev's BlogTagsaws, aws dynamodb, aws lambda
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Notify me of follow-up comments by email.
Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Post navigation
Recommend
-
14
Parse parameter default values using PowerShell – Part 3 In part 1 and
-
7
Parse parameter default values using PowerShell – Part 2 In my last post, I showed how to use TSqlParser
-
23
Optional parameters, default parameter values and method overloading yourbasic.org/golang
-
6
Parse parameter default values using PowerShell – Part 1 If you have ever tried to determine the default values for stored procedure parameters, you probably have marks on your forehead from hi...
-
9
How would you create a function template with more than one type parameter? If you don’t know what a function template is, then it would help if you read our quick
-
6
Meta’s new values look more awful than awesome Less than six months ago, it seemed that Meta, the company behind Facebo...
-
9
Just published: "Rejecting or Accepting Parameter Values in Bayesian Estimation" Just published: "Rejecting or Accepting Parameter Values in Bayesian Estimation" in the journal, Advances in Methods and Practices in Psychologic...
-
11
Code is available on GitHub Storing secrets in AWS For IAM credentials, AWS provides a secret-less way t...
-
9
Parameter Values in Blocks Dialogs » Guy on Simulink MATLAB R2022b was released a few weeks...
-
8
Code is available on GitHub Handling secrets in the cloud The recommended way to han...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK