In I Samuel 15, it records that King Saul wiped out all of Amalek, besides the king who was killed after a short period of time.

Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass. (I Samuel 15:3)

And Saul came to the city of Amalek, and lay in wait in the valley. (I Samuel 15:5)

And Saul smote the Amalekites, from Havilah as thou goest to Shur, that is in front of Egypt. And he took Agag the king of the Amalekites alive, and utterly destroyed all the people with the edge of the sword. (I Samuel 15:7-8)

And Samuel said: As thy sword hath made women childless, so shall thy mother be childless among women. And Samuel hewed Agag in pieces before the LORD in Gilgal. (I Sameul 15:33)

After a few years, though, David wars with the apparently strong Amalekite nation. For example:

And it came to pass, when David and his men were come to Ziklag on the third day, that the Amalekites had made a raid upon the South, and upon Ziklag, and had smitten Ziklag, and burned it with fire. (I Samuel 30:1)

Where did David's Amalekites come from?