The Israelites are slow to learn (as most are today). God was providing miraculous bread daily for the nation but that wasn't good enough! They get angry with Moses when there isn't enough water to drink. Why do they not express gratitude to God for the blessings they had received and then petition Him reverently for water? Do they not fear His power? Have they no concern for angering Him? Their faith is terribly fickle it seems. They praise God one minute and then the next they think He has delivered them from Egypt to destroy them! They are unstable in their ways and they are testing His longsuffering (cf. Num. 14:22). May we not follow their example but rather "do all things without complaining and disputing, that you may become blameless and harmless children of God without fault in the midst of a crooked and perverse generation, among whom you shine as lights in the world" (Phil. 2:14,15).
"So Moses cried out to the LORD, saying, 'What shall I do with this people? They are almost ready to stone me!'" (Exo. 17:4). Moses begged God for help and was then given instructions from Him. Moses was to "strike the rock" publicly in Horeb so that water would come out. He obeyed God when he struck the rock on this occasion though disobeyed on a later occasion (cf. Num. 20:7-12). "So he called the name of the place Massah and Meribah, because of the contention of the children of Israel, and because they tested the LORD, saying, 'Is the LORD among us or not?'" (Exo. 17:7). Christian friends, may we always remember that the Lord is always among us; He will not forsake His faithful ones (cf. Heb. 13:5)! Let us learn from these things written before (cf. Rom. 15:4).
"Now Amalek came and fought with Israel in Rephidim. And Moses said to Joshua, 'Choose us some men and go out, fight with Amalek. Tomorrow I will stand on the top of the hill with the rod of God in my hand.' So Joshua did as Moses said to him, and he fought with Amalek. And Moses, Aaron, and Hur went up to the top of the hill. And so it was, when Moses held up his hand, that Israel prevailed; and when he let down his hand, Amalek prevailed. But Moses' hands became heavy; so they took a stone and put it under him, and he sat on it. And Aaron and Hur supported his hands, one on one side; and the other on the other side; and his hands were steady until the going down of the sun. So Joshua defeated Amalek and his people with the edge of the sword."
More information is given on this battle in Deuteronomy 25:17-19. This battle is unique in Scripture. What are we to learn from it? I would suggest this: It is not military genius or the fighting skills of the Israelites that brought victory. Rather, it was the consistent and prevailing prayer of Moses. Although the text doesn't specify, what else would Moses have been doing but petitioning the Most High God and encouraging the people? When he grew tired, the people suffered loss. And so it is with godly leaders who become tired today! We must support them and all Christians, helping to bear one another's burdens (cf. Gal. 6:2). Let us not grow weary in doing good, but let us keep on keeping on!