Hagrid may have shrunk Aragog's body for transport
Hagrid brought Aragog's body out of the Forbidden Forest:
'Never bin an area o' the Forest I couldn' go before!' said Hagrid, shaking his head. 'It wasn' easy, gettin' Aragog's body out o' there, I can tell yeh -- they usually eat their dead, see...but I wanted ter give 'im a nice burial...a proper send-off...'
-- Half-Blood Prince (Chapter 22, "After the Burial")
This1 was a dangerous2 and difficult3 task, so Hagrid may have been tempted to cheat. After all, Hagrid was not even averse to using magic for convenience:
'Seems a shame ter row, though,' said Hagrid, giving Harry another of his sideways looks. 'If I was ter -- er -- speed things up a bit, would yeh mind not mentionin' it at Hogwarts?'
'Of course not,' said Harry, eager to see more magic. Hagrid pulled out the pink umbrella again, tapped it twice on the side of the boat and they sped off towards land.
-- Philosopher's Stone (Chapter 5, "Diagon Alley")
Shrinking potions are an early part of the third-year curriculum:
[Harry's] teachers at Hogwarts had given him a lot of holiday work. One of the essays, a particularly nasty one about Shrinking Potions...
-- Prisoner of Azkaban (Chapter 1, "Owl Post")
They were making a new potion today, a Shrinking Solution.
-- Prisoner of Azkaban (Chapter 7, "The Boggart in the Wardrobe")
Hagrid likely would have learned how to make shrinking potions by the time he was expelled:
[Hagrid] had been expelled from Hogwarts in his third year, for a crime he had not committed.
-- Prisoner of Azkaban (Chapter 5, "The Dementor")
Potions weren't even Hagrid's only option. Reducio is a fast-acting shrinking spell, and it is specifically shown to work on spiders:
'Reducio,' Moody muttered, and the spider shrank back to its proper size.
-- Goblet of Fire (Chapter 14, "The Unforgivable Curses")
1 Carrying a giant dead spider!
2 While being chased by giant hungry spiders!
3 Through a dense forest!