The boxes, each about the size of a mini-refrigerator or window AC unit, are crucial to keeping the batteries cool aboard the orbiting lab.
Since they operate using highly toxic ammonia, the spacewalkers had to take utmost care not to get any on their suits.
Known formally as pump flow control subassembly boxes, they were both considered spares, and did not interfere with cooling at the station while the work was under way.
"The purpose of the pump flow control subassembly is all about the cooling batteries that the space station holds its electrical power in," explained Anthony Vareha, a flight director at NASA.
"We need to keep the batteries cool just like in your cell phone."
The outing by veteran spacewalkers Ricky Arnold, 54, and Drew Feustel, 52, lasted six hours and 31 minutes.