South Africa reached 338 for three at the close of play, with Amla unbeaten on 124 at the Wanderers Stadium.
Duminy made 155 before he was caught at second slip off Lahiru Kumara in the penultimate over of the day, ending a third wicket partnership of 192.
Amla became the eighth player and second South African after former captain Graeme Smith to mark 100 Tests with a hundred.
The left-handed Duminy was the dominant partner as he shepherded Amla, who was dropped by Dhananjaya de Silva at gully off Suranga Lakmal when he had five.
More From This Section
Amla only scored six in the pair's first 50 runs together. Gradually, though, Amla found his timing and he reached his first half-century in 11 Test matches shortly before tea. He had faced 109 balls and hit seven fours.
He blossomed to hit his second half-century off only 60 balls, reaching his 26th Test hundred when he skipped down the wicket and lofted Rangana Herath over mid-off for his 14th four.
Duminy's previous highest score in three previous Tests at the Wanderers was 29.
Amla and Duminy came together when both opening batsmen, Stephen Cook and Dean Elgar, were dismissed within six balls when the total was on 45.
Cook and Elgar survived the first hour before both were out soon after the mid-morning drinks break.
Cook, playing in a Test on his home ground for the first time, was leg before wicket to Sri Lankan captain Angelo Mathews for ten. He sought a review of umpire Bruce Oxenford's decision but was palpably in front of his stumps.
Kumara finished the day with two for 79.
South Africa opted for an all-pace attack and gave a first cap to Duanne Olivier, 24, with left-arm spinner Keshav Maharaj being left out.
Left-arm seamer Wayne Parnell replaced Kyle Abbott, whose contract with Cricket South Africa was cancelled after he revealed he had signed a Kolpak contract to play English county cricket with Hampshire.
"These are nice conditions for Duanne to make a debut," South African captain Faf du Plessis said at the toss.