Yahweh told Moses to write about the battle in a book, because Yahweh will completely blot out the memory of Amalek from under the skies.