So Joshua overwhelmed Amalek and his army with the sword.
13. And Joshua discomfited Amalek. The copula is here used instead of the illative particle; for Moses here concludes that the Israelites overcame their enemies, because he had continually persevered in prayer. There is, too, an implied antithesis between the firmness of his hands and the weakness of the enemy, that we may know that they were discomfited or conquered, not so much by the...
We have here the story of the war with Amalek, which, we may suppose, was the first that was recorded in the book of the wars of the Lord, Num 21:14. Amalek was the first of the nations that Israel fought with, Num 24:20. Observe, I. Amalek's attempt: They came out, and fought with Israel, Exo 17:8.
Commenting on Exodus 17:8-16
And Joshua discomfited Amalek and his people with the edge of the sword. Amalek being distinguished from "his people", has led some to think that Amalek was the name of the king, or general of the army, and that it was a common name to the kings of that nation, as Pharaoh was to the kings of Egypt; but for this there is no foundation...