I have a very simple class, with a string type primary key and List type attributes. I want to write an API for adding and removing an item from the attribute list, and saving the changes back to DDB.
The simplest solution I can think of is:
Is there a cleaner/simpler way to do this via DynamoDB java API?
The accepted answer is incorrect, the correct way of doing this is listed in the DynamoDB UpdateExpression documentation
You need to read the list then get the index of the item you're looking to remove then run REMOVE list[index]
as an UpdateExpression
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With