Aztec warriors were not European peasants though . They were highly skilled and well equipped. They didn't have steel blades (except what they captured from the invaders), but their obsidian "swords" were not that much worse in the hands of a skilled fighter. Plus the European handguns were not that reliable and accurate yet to be all that useful except for showing off. If the first shot missed (assuming it didn't misfire) there was no time for another. And guns need a steady supply of powder and bullets, which Cortez didn't have most of the time since he was also at odds with the governor of Cuba.
There's also plenty of accounts from the early days of Cortez' invasion where the Spaniards had a very hard time against the indigenous warriors even when the Spaniards were not largely outnumbered.