Ukrainian military spending: $5.4 billion
I have serious doubts the outside world dumped more than $5 billion on Ukraine's side. Russian made a serious error in how much territory they tried to hold as opposed to the re-positioning / fighting over Donbas that's happening now.
If the US ($801 billion) tried to conquer Canada ($26 billion), I would expect a similarly poor outcome based on Canada's size. If the US tried to annex specific oil rich areas under the guise of "protecting" oil pipelines, it's be reprehensible, but so was Crimea.