How do you beat the giant snake in Assassin’s Creed Origins?

Quick answer: Your bow of light is your only weapon. Fire fast without aiming while you strafe from side to side, dodge its lunges, and in phase two get out of the liquid around the ruins at once.
Show walkthrough (quest spoilers)
Where the fight is
The giant serpent is the boss of the dream in The Lizard’s Mask, after Bayek drinks the seer’s brew in Memphis. You get a bow of light, and it is the only weapon you can use.
Phase one: the barge
You stand on a barge while the serpent spits poison from among the pillars. It sometimes swims under the boat to switch sides, and it lunges across the barge twice before going back to poison. Your health recovers between these cycles.
How to shoot
Do not draw and aim slowly. Fire arrows as fast as you can while you strafe back and forth, which also keeps you out of the poison. Keep this up through the whole fight.
Phase two: solid ground
At half health, a scene moves you onto solid ground. The serpent’s lunges now break the ground where they land. If you end up in the liquid around the ruins, get out right away, because you only have a few seconds before you die.
After the fight
Swim through the lily lake and run toward the sun in the wheat field to wake up. The Lizard’s Mask walkthrough covers the rest of the quest.
