Error: dynamodb list_append returns true but does not work
Answered by Rafal Wilinski
What's Causing This Error
This is not exactly an error but can likely be caused due to a programmer-introduced bug. The list_append()
function accepts two parameters: the initial list and the value to append.
If you provide an empty array to append to it, the function will still execute successfully, but nothing will change in the database, which might make you feel like the function does not work.
Solution: Here's How To Resolve It
To resolve the error, carefully provide the arguments for the function as shown below:
const params = { TableName: 'test-table', UpdateExpression: 'SET users = list_append(:users, newUser)'. ExpressionAttributeValues: { // append an array, as DynamoDB will join the arrays while it saves. newUser: [{name: 'Jake'}] } }
Other Common DynamoDB Errors (with Solutions)
- dynamodb cannot pickle '\_thread.lock' object
- AWS Lambda DynamoDB Stream Error
- DynamoDB Is Unsupported It Cannot Be Instantiated
- why is the GSI dynamodb not showing item count
- DynamoDB Key element does not match the schema
- DynamoDB Is Not Null
- DynamoDB ConditionalCheckFailedException
- dynamodb cannot create preexisting table
- DynamoDB ValidationException: Query condition missed key schema element
- dynamodb consistent reads are not supported on global secondary indexes
- Unable to start DynamoDB Local process
- DynamoDB Network Error: self signed certificate in chain
- dynamodb text contents could not be decoded
- DynamoDB type item is not supported
- does not support attribute type arn aws dynamodb
Tired of AWS Console? Try Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2024 Dynobase