Exodus.
Chapter 17.
The whole community of the Israelites journeyed from the wilderness of Sin, following Yahweh's instructions. They camped at Rephidim, but there was no water for the people to drink. 
So the people blamed Moses for their situation and said, “Give us water to drink.” Moses said, “Why do you quarrel with me? Why do you test Yahweh?” 
The people were very thirsty, and they complained against Moses. They said, “Why have you brought us up out of Egypt? To kill us and our children and our cattle with thirst?” 
Then Moses cried out to Yahweh, “What should I do with this people? They are almost ready to stone me.” 
Yahweh said to Moses, “Go on ahead of the people, and take with you some elders of Israel. Take with you the staff with which you struck the river, and go. 
I will stand before you there on the rock at Horeb, and you will strike the rock. Water will come out of it for the people to drink.” Then Moses did so in the sight of the elders of Israel. 
He called that place Massah and Meribah because of the Israelites' complaining, and because they had tested the Lord by saying, “Is Yahweh among us or not?” 
Then an army of the Amalek people came and attacked Israel at Rephidim. 
So Moses said to Joshua, “Choose some men and go out. Fight with Amalek. Tomorrow I will stand on top of the hill with the staff of God in my hand.” 
So Joshua fought Amalek as Moses had instructed, while Moses, Aaron, and Hur went up to the top of the hill. 
While Moses was holding his hands up, Israel was winning; when he let his hands rest, Amalek would begin to win. 
When Moses' hands became heavy, Aaron and Hur took a stone and put it under him for him to sit on. At the same time, Aaron and Hur held his hands up, one person on one side of him, and the other person on the other side. So Moses' hands were held steady until the sun went down. 
So Joshua defeated the people of Amalek with the sword. 
Yahweh said to Moses, “Write this in a book and read it in Joshua's hearing, because I will completely blot out the memory of Amalek from under the skies.” 
Then Moses built an altar and he called it “Yahweh is my banner.” 
He said, “For a hand was lifted up to the throne of Yahweh—that Yahweh will wage war with Amalek from generation to generation.” 
