Codex literally means the trunk of a tree or a block of wood.

Book, on the other hand traces back to the word for beech tree. Apparently it was the preferred wood for carving runes into. The word histories of book and codex are practically identical.