So was there a way out for the Amalekites?
When the Israelites attacked them, the Amalekites had four options.
Option 1 - (Bravely) Run Away
The Israelite army didn't have cars or aeroplanes. They would have moved at the speed of the slowest unit, which was probably a heavy wagon with supplies. We're told the army consisted of 210,000 men. They were a huge army, and moved slowly. That means it was very easy to spot them coming, and very easy to run away. In the ancient world, the number of civilian casualties in war was tiny. This is mainly because it was very easy to run away. Only the people who stay to fight get killed.
Option 2 - Join the Kenites
The Kenites lived in the same area as the Amalekites, but they were friendly towards the Israelites. When Saul's army arrived at the Amalekite city, the first thing they do is send a message to the Kenites.
Then Saul said to the Kenites, "Go, depart; go down from among the Amalekites, lest I destroy you with them. For you showed kindness to all the people of Israel when they came up out of Egypt." So the Kenites departed from among the Amalekites.
1 Samuel 15:6
Now, that makes it look very much as if the Kenites are mingling with the Amalekites fairly freely. Suppose an Amalekite decided that they didn't want to fight against Israel. There doesn't seem to have been anything stopping them from deciding to be a Kenite – dressing themselves up as a Kenite and just slipping off. The Amalekites had a way out, if only they were willing to deny their identity as Amalekites.
Option 3 - Surrender
There's a set of rules for how Israel was meant to conduct their wars outside their own borders. We don't know if Israel followed them or not on this occasion, but they should have done.
When you draw near to a city to fight against it, offer terms of peace to it. And if it responds to you peaceably and it opens to you, then all the people who are found in it shall do forced labor for you and shall serve you. But if it makes no peace with you, but makes war against you, then you shall besiege it. And when the LORD your God gives it into your hand, you shall put all its males to the sword...
Deuteronomy 20:10-13, ESV
God's specific command to Saul in 1 Samuel 15 overrides the rest of those orders (about prisoners and plunder), but not the first bit. Saul should have offered the Amalekites the chance to surrender and join in with the Israelites and God's plan to bless the world.
Option 4 - Stay and Fight
The fourth choice the Amalekites had was to hold onto their identity as the people who always fight the Israelites, and stay and fight. This option is the only one which leads to the Amalekites being killed.