So,I've been trying and struggling to secure DynamoDB to recognise the key I am creating, using two merged slots. My Lambda is below, and I believe it is the constructed DDID variable that is not right. If I force a static key,it finds the data without an issue (e.g. SNP1, Labour2, or Conservatives3,etc, etc). Can anyone see what I am doing incorrect? the DDID should match the above combing the party and Ward information provided by the user in defined slots under the intent. var DDID; const params = { TableName: 'SurgeryData', and Key:{ "id": DDID} }; ==============================================================================
'CouncillorIntent': function () { var filledSlots = delegateSlotCollection.call(this); speechOutput = ''; var wardSlotRaw = this.event.request.intent.slots.ward.value;
console.log(wardSlotRaw); var wardSlot = resolveCanonical(this.event.request.intent.slots.ward);
console.log(wardSlot); var partySlotRaw = this.event.request.intent.slots.party.value;
console.log(partySlotRaw); var partySlot = resolveCanonical(this.event.request.intent.slots.party); var DDID = partySlot+wardSlot; console.log(DDID); Can anyone see what I am doing incorrect with the construction of DDID?
Source: amazon.com