David’s conflict against the Ammonites is recorded in 2 Samuel 10:1–12:31. There are no specific battles recorded against the Amalekites, but we know from earlier chapters that David fought against them (see 1 Samuel 27:8; 1 Samuel 30:1–31) and thereby executed the Lord's justice (Exodus 17:14; Deuteronomy 25:19).1
12 from Edom, Moab, the Ammonites, the Philistines, Amalek, and from the spoil of Hadadezer the son of Rehob, king of Zobah.