Title
There are three different gods in the equation here.
Amun, king of the gods and foremost in the Egyptian pantheon.
Ra, ancient primeval sun god, worshipped from the earliest dynasties of Egyptian history, and often serving to enhance he godhood of other deities, like Amun in his interpretation as Amun-Ra.
Aten, the deified sun disk and an astronomical god, specifically associated with the orb of the sun and not necessarily anthropomorphised. Aten only begins to occur as a deity in its own right in Dynasty 17 (16th century BC), whereas Ra had been worshipped since the early third millennium BC.
Before that, the Aten was a symbol in which gods could appear - a deity within the gleaming solar disk itself - and it seems to be through this association that it status developed into that of a discrete god.
Deities in ancient Egypt did not operate on a zero-sum basis. There was not only one sun god, or one fertility god, or one Nile god. Instead, there was a constant conveyer belt of deities rising and falling in popularity, merging with each other, separating again, even forming entirely new deities. This fluctuation depended on politics, geographical favour, the status and wealth of cults, the captives of rulers and other factors,
Ra and Aten were worshipped simultaneously and were understood as related to each other - the primeval god Ra essentially being reduced to sun disk iconography as Aten. They were not mutually exclusive and indeed existed in relation to each other.
Sources: Wilkinson, Complete Gods and Goddesses of Ancient Egypt Hart, Routledge Dictionary of Egyptian Gods and Goddesses