The Amalekites attacked Israel during the lifetime of Moses just once. The Egyptians oppressed the Israelites over an extended period, starting a slow genocide by killing every male Israelite child. The whole thrust of the narrative would suggest that if any nation would become the symbol of evil, it would be Egypt. But the opposite turns out to be true.
The contrast between before and after the Red Sea could not be more complete. Facing the approaching Egyptians, do nothing. In the case of the Amalekites, however, go fight.