Search code examples
javaspringamazon-web-servicesamazon-dynamodbdynamodb-queries

Deleting Item Within Item in DynamoDB with Java


There is documentation given by AWS on how to delete an item within a table. However, I'm not trying to delete the entire item; I'm only trying to delete a few rows within the item.

Let's say I have this item in a DynamoDB table (the same example from the documentation).

{
   year: 2015,
   title: "The Big New Movie",
   info: {
           plot: "Everything happens all at once.",
           rating: 5.5,
           actors: ["Larry", "Moe", "Curly"]
   }
}

I understand the guidance the documentation is giving on deleting items in a table, but let's say don't want to delete this entire item; I only want to delete that "title" portion.

Is this something possible? Is the only way really to just delete the entire item and create another item with the fields I want?

Thanks for any help.


Solution

  • This sounds to me more like updating than deleting, this might help: Deleting Attribute in DynamoDB