Noticed that log_out_user fails when deleting device from legacy DDB table. At least on Localstack.
The error thrown from update_item() call is as following:
ServiceError(ServiceError { source: UpdateItemError { kind: Unhandled(Unhandled { source: Error { code: Some("ValidationException"), message: Some("Invalid UpdateExpression: Internal server error"), ...) `
Reading AWS docs, I noticed they either hardcode map keys or use expressio attribute names for map keys, not values. This solved the issue.
docs, example SO answer