The phrasing of the invocation from XGtE pg. 56 is:
You no longer need to sleep and can't be forced to sleep by any means. (emphasis mine)
To me this phrasing sounds like it is specifically referring to means such as the Sleep spell, however I have seen it argued in other places that since Sleep's phrasing is:
Each creature affected by this spell falls unconscious until the spell ends… PHB pg. 276 (emphasis mine)
Since AotM does not make one immune to the unconscious condition, a Warlock would still be affected even with this invocation.
However the phrasing of the spell also uses words like "magical slumber" and "the sleeper".
Best Answer
A warlock with Aspect of the Moon cannot be put to sleep by sleep
Sleep says:
The spell makes it clear that it puts the creature to sleep. Note the many reference to sleep sleeping and awake in the spell effect description. The unconscious condition is simply a mechanical way the game models sleep, but it does not change the fact that the spell indeed puts a creature to sleep.
The Aspect of the Moon invocation says:
Having this aspect clearly then negates any attempt to put the warlock to sleep. And since sleep tries to do just that, the invocation allows them to be completely unaffected by the spell.