The tribe of Amalek attacked the Israelites at Rephidim, cruelly cutting off the weak and those lagging behind. Joshua engaged Amalek in battle, successfully defending Israel against the merciless enemy.
Then God told Moses, "Write this as a reminder in the book, and recite it in Joshua's ears: I will completely 
"Mamlechet kohanim" refers to the aspiration to uplift the entire world.
obliterate the memory of Amalek from under the heavens." (Exodus 17:14)

"Mamlechet kohanim" refers to the aspiration to uplift the entire world.
obliterate the memory of Amalek from under the heavens." (Exodus 17:14)Why did God command Moses to write His promise to obliterate Amalek in the Torah? And why did Joshua need to be told verbally? Couldn't he just read what was written in the Torah?
Two Missions
The people of Israel have two national missions. At Mount Sinai, God informed them that they would be a mamlechet kohanim (kingdom of priests) as well as a goy kadosh (holy nation) (Exodus 19:6). What is the difference between these two goals?
Mamlechet kohanim refers to the aspiration to uplift the entire world, so that all will recognize God. The people of Israel will fulfill this mission when they function as kohanim for the world, teaching them God's ways.
But the Jewish people are more than a tool to elevate the rest of the world. They have their own intrinsic worth and they need to perfect themselves on their own special level. The central mission of Israel is to fulfill its spiritual potential and become a goy kadosh. If Israel's only purpose was to uplift the rest of the world, then they would not have been commanded with so many mitzvot that serve to isolate them from the other nations.
Two Torahs
God divided the Torah - divine instructions how to realize our spiritual potential - into two parts: the Written Law and the Oral Law. The written Torah was revealed to the whole world. All nations can approach and grasp these teachings. In fact, God commanded that the Torah be written "in a clear script" (Deuteronomy 27:8) - in seventy languages, so that it would be accessible to all peoples (Sotah 7:5). The Written Torah was meant to enlighten the entire world.
The Oral Law, on the other hand, belongs solely to the Jewish people. Since this part of Torah was not to be committed to writing, it is naturally more concealed and less universal. In truth, the Oral Law is simply the received explanation of the Written Law, transmitted over the generations. Thus, even the Written Torah is only fully accessible to Israel, through the Oral tradition. But the other nations nevertheless merit an external grasp of the Written Torah.
God's Name and Throne
Amalek refutes both missions of Israel. Amalek cannot accept Israel as a mamlechet kohanim who instruct the world; nor as a goy kadosh, separated from the other nations with unique spiritual aspirations. God promised to "completely obliterate" - "macho emcheh" - Amalek. In Hebrew, the verb is repeated, thus indicating that God will blot out both of Amalek's rejections.
Why did God command that His promise to destroy Amalek be both written down and transmitted orally to Joshua?
Since Amalek rejects Israel's mission to elevate humanity, God commanded that the promise to obliterate Amalek
Amalek denies Israel's own unique spiritual heritage.
be recorded in the Written Torah. The Written Law is, after all, the primary source of Israel's moral influence on the world. And since Amalek denies Israel's own unique spiritual heritage, God commanded that this promise also be transmitted verbally to Moses' disciple. This aspect corresponds to the Oral Torah, belonging exclusively to the people of Israel.

Amalek denies Israel's own unique spiritual heritage.
be recorded in the Written Torah. The Written Law is, after all, the primary source of Israel's moral influence on the world. And since Amalek denies Israel's own unique spiritual heritage, God commanded that this promise also be transmitted verbally to Moses' disciple. This aspect corresponds to the Oral Torah, belonging exclusively to the people of Israel. When Amalek has been utterly destroyed, then Israel will be able to fulfill both of its charges. This is the significance of the statement of the sages: "God vowed that His Name and His Throne are not complete until Amalek's name will be totally obliterated." (Tanchuma Ki Tetzei 11; Rashi on Exodus 17:16)
What are God's Name and God's Throne? They are allegories for Israel's two missions: spreading knowledge of God - His Name - and creating a special dwelling place for God's presence in the world - His Throne.
[Adapted from Midbar Shur, pp. 312-316]