2 Answers
- Newest
- Most votes
- Most comments
0
Found the Answer after iterating with ChatGpt.
I had to rewrite my mapping request with an If clause.
If salesforce_id = 0, send the request with no ExclusiveStartKey field. Else, send the request with the ExclusiveStartKey fielda.
{
"TableName": "Test-Table",
"Limit": 100,
"FilterExpression": "wb_date = :val",
"ExpressionAttributeValues": {
":val": {
"S": "$input.params('wb_date')"
}
},
#if($input.params('salesforce_id') == "0")
"ReturnConsumedCapacity": "TOTAL"
#else
"ExclusiveStartKey": {
"salesforce_id": {
"S": "$input.params('salesforce_id')"
},
"type": {
"S": "$input.params('type')"
}
},
"ReturnConsumedCapacity": "TOTAL"
#end
}
answered 2 years ago
0
ExclusiveStartKey isn't a required parameter in the request structure so you should be able to omit it entirely for your initial request.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago

Thank you, but did not worked for me. If I ommit the ExclusiveStartKey in the mapping request the request will not take it into account once I need it.