[Vuejs]-Dynamo DB query fails through axios with Value null at 'tableName' failed to satisfy constraint

0👍

This one came down to the formatting of the request. Here is the correct way to format the data:

  var data = JSON.stringify({
    TableName: 'prospect-materials',
    ExpressionAttributeNames: {'#lang':'LANGUAGE'},
    ExpressionAttributeValues:{
      ':m':{S:'Acet'},
      ':c':{S:'CH'},
      ':l':{S:'DE'}},
    FilterExpression: 'begins_with(MAT_DESC, :m) and COUNTRY = :c and #lang = :l'
  })

Leave a comment