99x / 99x/serverless-dynamodb-local
DynamoDB shell returns items - lambda not
- Dominant language
- JavaScript
- Stars
- 621
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
**Actual Behaviour**
Lambda function returns zero elements while the same query running in the webbased shell returns values (running all locally).
**Expected Behaviour**
I would expect, that the same result is returned when running lambda function locally, as well as running the same query used in the lambda function in the webbased shell.
**Steps to reproduce it**
Request
```
var params = {
TableName: 'schools',
FilterExpression: '#school_name = :value',
ExpressionAttributeNames: { '#school_name': 'name' },
ExpressionAttributeValues: { ':value': { S: 'School 1' } }
};
dynamodb.scan(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
```
**Response in the webbased shell**
```
{ Items: [............],
Count: 74,
ScannedCount: 74,
LastEvaluatedKey: { id: '6fcbcaf8-d4fc-4484-a74f-7ce9b18cbc6f' } }
```
**Response in the lambda function**
```
{ Items: [],
Count: 0,
ScannedCount: 74,
LastEvaluatedKey: { id: '6fcbcaf8-d4fc-4484-a74f-7ce9b18cbc6f' } }
```
**Would you like to work on the issue?**
No able to resolve the issue myself.
Contributor guide
Research direction
Start by reproducing the scan request in the web-based shell and the local Lambda function, then compare their DynamoDB request inputs and responses. The issue is resolved when the Lambda invocation returns the same matching items as the shell for the documented request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100