But the Proteas, needing a win to level the five-match series 2-2, undid a good start by losing eight wickets for 87 runs after cruising at 118-1 in the 22nd over.
Duminy lashed seven boundaries and two sixes before he was last man out in the 49th over, bowled by unorthodox spinner Ajantha Mendis three runs short of a century.
Mendis finished with four for 51, while sling-arm fast bowler Lasith Malinga claimed three for 52 and Tillakaratne Dilshan took two wickets.
Duminy shared a second-wicket stand of 101 with Amla after Quinton de Kock had been bowled by Malinga in the third over.
More From This Section
Dilshan removed Amla leg-before and had skipper AB de Villers caught behind by Kumar Sangakkara in the space of eight runs to make it 126-3 in the 25th over.
Faf du Plessis helped Duminy add 46 for the fourth wicket but his dismissal for 23, stumped off Rangana Herath, triggered a middle-order collapse.
Malinga returned to dismiss Robin Peterson (13) and Rory Kleinveldt (eight) before Mendis had Morne Morkel leg-before.