0
私のupdate_item操作が冪等であるようにしたいと思います。私はlist型の属性を持っていますが、存在しない場合にのみリストに要素を追加したいと思います。私は私が使用する必要があることを想像:ここConditionExpression
Dynamodb update_item idempotentを作成する - リスト属性
uptd = 'SET status_pedido_disponiveis = list_append(if_not_exists(status_pedido_disponiveis, :empty_list), :my_value)'
attr={ ":my_value": {"L": [{"S": xml }]}, ":empty_list":{"L": [] } }
self.dynamodb.update_item(TableName=self.table_name, Key={'order_id':{'S': order_id}},
UpdateExpression=uptd,
ExpressionAttributeValues=attr
)