You are correct! The ammonia attacks the highly electropositive carbonyl carbon atom and forms this intermediate.