I'm trying to update an item in DynamoDB using the AWS gem and the following code, but I'm getting an error "Aws::DynamoDB::Errors::ValidationException (The provided key element does not match the schema):" I can't figure out what is wrong with my key expression.
dynamodb.update_item(
# required
:table_name => "product",
:key => { :id => 1066746881, :storeid => 8652562},
:attribute_updates => {
"delete" => {
value: "true",
action: "PUT",
}
}
)
I'm trying to add a new field "delete" set to "true". The table has two primary keys on it - Primary Hash Key: storeid (Number) Primary Range Key: id (Number)
I must be missing something obvious but I can't figure out why this isn't working.
Aucun commentaire:
Enregistrer un commentaire