Amalekites, Canaanites and Morality
Question
In the tanakh, Hashem commands the Jewish nation to exterminate the Amalekites and brutally attack the caananites. How ought one go around explaining the ethics of this to a non religious person (or a person of another religion like Buddhism or paganism)?