Internal & External Amalek
(א) וַ֠יִּסְעוּ כָּל־עֲדַ֨ת בְּנֵֽי־יִשְׂרָאֵ֧ל מִמִּדְבַּר־סִ֛ין לְמַסְעֵיהֶ֖ם עַל־פִּ֣י יְהוָ֑ה וַֽיַּחֲנוּ֙ בִּרְפִידִ֔ים וְאֵ֥ין מַ֖יִם לִשְׁתֹּ֥ת הָעָֽם׃ (ב) וַיָּ֤רֶב הָעָם֙ עִם־מֹשֶׁ֔ה וַיֹּ֣אמְר֔וּ תְּנוּ־לָ֥נוּ מַ֖יִם וְנִשְׁתֶּ֑ה וַיֹּ֤אמֶר לָהֶם֙ מֹשֶׁ֔ה מַה־תְּרִיבוּן֙ עִמָּדִ֔י מַה־תְּנַסּ֖וּן אֶת־יְהוָֽה׃ (ג) וַיִּצְמָ֨א שָׁ֤ם הָעָם֙ לַמַּ֔יִם וַיָּ֥לֶן הָעָ֖ם עַל־מֹשֶׁ֑ה וַיֹּ֗אמֶר לָ֤מָּה זֶּה֙ הֶעֱלִיתָ֣נוּ מִמִּצְרַ֔יִם לְהָמִ֥ית אֹתִ֛י וְאֶת־בָּנַ֥י וְאֶת־מִקְנַ֖י בַּצָּמָֽא׃ (ד) וַיִּצְעַ֤ק מֹשֶׁה֙ אֶל־יְהוָ֣ה לֵאמֹ֔ר מָ֥ה אֶעֱשֶׂ֖ה לָעָ֣ם הַזֶּ֑ה ע֥וֹד מְעַ֖ט וּסְקָלֻֽנִי׃ (ה) וַיֹּ֨אמֶר יְהוָ֜ה אֶל־מֹשֶׁ֗ה עֲבֹר֙ לִפְנֵ֣י הָעָ֔ם וְקַ֥ח אִתְּךָ֖ מִזִּקְנֵ֣י יִשְׂרָאֵ֑ל וּמַטְּךָ֗ אֲשֶׁ֨ר הִכִּ֤יתָ בּוֹ֙ אֶת־הַיְאֹ֔ר קַ֥ח בְּיָדְךָ֖ וְהָלָֽכְתָּ׃ (ו) הִנְנִ֣י עֹמֵד֩ לְפָנֶ֨יךָ שָּׁ֥ם ׀ עַֽל־הַצּוּר֮ בְּחֹרֵב֒ וְהִכִּ֣יתָ בַצּ֗וּר וְיָצְא֥וּ מִמֶּ֛נּוּ מַ֖יִם וְשָׁתָ֣ה הָעָ֑ם וַיַּ֤עַשׂ כֵּן֙ מֹשֶׁ֔ה לְעֵינֵ֖י זִקְנֵ֥י יִשְׂרָאֵֽל׃ (ז) וַיִּקְרָא֙ שֵׁ֣ם הַמָּק֔וֹם מַסָּ֖ה וּמְרִיבָ֑ה עַל־רִ֣יב ׀ בְּנֵ֣י יִשְׂרָאֵ֗ל וְעַ֨ל נַסֹּתָ֤ם אֶת־יְהוָה֙ לֵאמֹ֔ר הֲיֵ֧שׁ יְהוָ֛ה בְּקִרְבֵּ֖נוּ אִם־אָֽיִן׃ (פ) (ח) וַיָּבֹ֖א עֲמָלֵ֑ק וַיִּלָּ֥חֶם עִם־יִשְׂרָאֵ֖ל בִּרְפִידִֽם׃ (ט) וַיֹּ֨אמֶר מֹשֶׁ֤ה אֶל־יְהוֹשֻׁ֙עַ֙ בְּחַר־לָ֣נוּ אֲנָשִׁ֔ים וְצֵ֖א הִלָּחֵ֣ם בַּעֲמָלֵ֑ק מָחָ֗ר אָנֹכִ֤י נִצָּב֙ עַל־רֹ֣אשׁ הַגִּבְעָ֔ה וּמַטֵּ֥ה הָאֱלֹהִ֖ים בְּיָדִֽי׃ (י) וַיַּ֣עַשׂ יְהוֹשֻׁ֗עַ כַּאֲשֶׁ֤ר אָֽמַר־לוֹ֙ מֹשֶׁ֔ה לְהִלָּחֵ֖ם בַּעֲמָלֵ֑ק וּמֹשֶׁה֙ אַהֲרֹ֣ן וְח֔וּר עָל֖וּ רֹ֥אשׁ הַגִּבְעָֽה׃ (יא) וְהָיָ֗ה כַּאֲשֶׁ֨ר יָרִ֥ים מֹשֶׁ֛ה יָד֖וֹ וְגָבַ֣ר יִשְׂרָאֵ֑ל וְכַאֲשֶׁ֥ר יָנִ֛יחַ יָד֖וֹ וְגָבַ֥ר עֲמָלֵֽק׃ (יב) וִידֵ֤י מֹשֶׁה֙ כְּבֵדִ֔ים וַיִּקְחוּ־אֶ֛בֶן וַיָּשִׂ֥ימוּ תַחְתָּ֖יו וַיֵּ֣שֶׁב עָלֶ֑יהָ וְאַהֲרֹ֨ן וְח֜וּר תָּֽמְכ֣וּ בְיָדָ֗יו מִזֶּ֤ה אֶחָד֙ וּמִזֶּ֣ה אֶחָ֔ד וַיְהִ֥י יָדָ֛יו אֱמוּנָ֖ה עַד־בֹּ֥א הַשָּֽׁמֶשׁ׃ (יג) וַיַּחֲלֹ֧שׁ יְהוֹשֻׁ֛עַ אֶת־עֲמָלֵ֥ק וְאֶת־עַמּ֖וֹ לְפִי־חָֽרֶב׃ (פ) (יד) וַיֹּ֨אמֶר יְהוָ֜ה אֶל־מֹשֶׁ֗ה כְּתֹ֨ב זֹ֤את זִכָּרוֹן֙ בַּסֵּ֔פֶר וְשִׂ֖ים בְּאָזְנֵ֣י יְהוֹשֻׁ֑עַ כִּֽי־מָחֹ֤ה אֶמְחֶה֙ אֶת־זֵ֣כֶר עֲמָלֵ֔ק מִתַּ֖חַת הַשָּׁמָֽיִם׃ (טו) וַיִּ֥בֶן מֹשֶׁ֖ה מִזְבֵּ֑חַ וַיִּקְרָ֥א שְׁמ֖וֹ יְהוָ֥ה ׀ נִסִּֽי׃ (טז) וַיֹּ֗אמֶר כִּֽי־יָד֙ עַל־כֵּ֣ס יָ֔הּ מִלְחָמָ֥ה לַיהוָ֖ה בַּֽעֲמָלֵ֑ק מִדֹּ֖ר דֹּֽר׃ (פ)

(1) From the wilderness of Sin the whole Israelite community continued by stages as Adonai would command. They encamped at Rephidim, and there was no water for the people to drink. (2) The people quarreled with Moses. “Give us water to drink,” they said; and Moses replied to them, “Why do you quarrel with me? Why do you try Adonai?” (3) But the people thirsted there for water; and the people grumbled against Moses and said, “Why did you bring us up from Egypt, to kill us and our children and livestock with thirst?” (4) Moses cried out to Adonai, saying, “What shall I do with this people? Before long they will be stoning me!” (5) Then Adonai said to Moses, “Pass before the people; take with you some of the elders of Israel, and take along the rod with which you struck the Nile, and set out. (6) I will be standing there before you on the rock at Horeb. Strike the rock and water will issue from it, and the people will drink.” And Moses did so in the sight of the elders of Israel. (7) The place was named Massah and Meribah, because the Israelites quarreled and because they tried Adonai, saying, “Is Adonai present among us or not?” (8) Amalek came and fought with Israel at Rephidim. (9) Moses said to Joshua, “Pick some men for us, and go out and do battle with Amalek. Tomorrow I will station myself on the top of the hill, with the rod of God in my hand.” (10) Joshua did as Moses told him and fought with Amalek, while Moses, Aaron, and Hur went up to the top of the hill. (11) Then, whenever Moses held up his hand, Israel prevailed; but whenever he let down his hand, Amalek prevailed. (12) But Moses’ hands grew heavy; so they took a stone and put it under him and he sat on it, while Aaron and Hur, one on each side, supported his hands; thus his hands remained steady until the sun set. (13) And Joshua overwhelmed the people of Amalek with the sword. (14) Then Adonai said to Moses, “Inscribe this in a document as a reminder, and read it aloud to Joshua: I will utterly blot out the memory of Amalek from under heaven!” (15) And Moses built an altar and named it Adonai-nissi. (16) He said, “It means, ‘Hand upon the throne of Adonai!’ Adonai will be at war with Amalek throughout the ages.”

מתני׳ (שמות יז, יא) והיה כאשר ירים משה ידו וגבר ישראל וגו' וכי ידיו של משה עושות מלחמה או שוברות מלחמה אלא לומר לך כל זמן שהיו ישראל מסתכלין כלפי מעלה ומשעבדין את לבם לאביהם שבשמים היו מתגברים ואם לאו היו נופלים

MISHNA: “And it came to pass, when Moses held up his hand, that Israel prevailed; and when he let down his hand, Amalek prevailed” (Exodus 17:11). It may be asked: Did the hands of Moses make war when he raised them or break war when he lowered them? Rather, the verse comes to tell you that as long as the Jewish people turned their eyes upward and subjected their hearts to their Guardian in Heaven, they prevailed, but if not, they fell.

And it came to pass, when Moses raise his hand... The Torah text actually states, "when Moses will raise," in the the future tense, to teach us that whenever Moses raises his hand, namely the power of the Torah, Israel prevails, and if not, Heaven forbid, then Amalek prevails.

Hafetz Hayim

Our holy Torah is eternal, and there is nothing in it which is linked to only one specific time. It symbolizes all eras and all times. Here too, the Torah comes to hin to us...that the battle against the Evil Inclination is not like the other battles, where one can have a decisive, permanent victory over a given enemy. Even if one defeats the Evil Inclination a hundred times, and leaves it alone by itself for even an instant, it immediately gains the upper hand. Therefore a person must be engaged in battle against the Evil Inclination their entire life. If one lets their hands down, Amalek prevails.

Korban He-Ani, 19th century​​​​​​​