At one point, God warns the Israelites against making "graven images". This is Exodus 20:4:
On the other hand, when God is telling them how to construct the Ark of the Covenant, he specifies the following decorations, at Exodus 25:18:
There's certainly a tension between these verses. These golden cherubim are definitely a likeness of something that is in heaven above. However, it's worth noting that, in the earlier verse, God prohibits making a graven image for yourself. One might say that the golden cherubim were made for God, and that this is the important distinction.
Furthermore, Exodus 20:5 explains that the reason why graven images are forbidden is that worship of such idols is offensive to God. Thus, the creation of such a thing might be acceptable if it was not for worship.