Question: are esters more reactive than amides?
Answer: An acid chloride is more reactive than an amide, therefore treatment of acetyl chloride with ammonia will yield acetamide. The above acetamide can be prepared from ester as well, since esters are more reactive than amides.