I want to update dynamoDB items with nested maps in where I don't know if the items does already exist or not. If it already exist it's all good. But if the item does not exist yet I get an error. I don't have the option to create those "empty" items/maps upfront. So I tried to solve this issue by using two SETs inside UpdateExpression:
UpdateExpression: "SET #info = if_not_exists(#info, :fullData), #info.#version = :shortData",
Which get's me following error:
Two document paths overlap with each other; must remove or rewrite one of these paths; path one: [info], path two: [info, V202014]"
Did anyone found a solution without having to make a try except block with 2 calls (1 update => if error add new)? Or how to get around the two paths restriction?