South Africa were 232 for seven at lunch, a lead of 309 on a pitch of occasional unpredictable bounce.
Amla (71) and De Kock (77 not out) shared a sixth wicket partnership of 102 before Amla was caught behind off a ball from Hasan Ali which lifted sharply off a good length. He faced 144 balls and hit 14 fours.
The pair had come together at 93 for five, when South Africa´s lead was only 170.
While Amla was largely watchful and patient, De Kock batted fluently in reaching his fifty off 49 balls. By lunch he had faced 91 deliveries and hit ten fours.