This can be achieved, at room temperature, by reaction with an acyl chloride RCOCl, or an acid anhydride RCOOCOR.
Primary AMINE + ACYL CHLORIDE => SECONDARY AMIDE + HCl gas.
For example: CH3COCl + CH3CH2NH2 => CH3CONHCH2CH3 + HCl
The secondary amide here is named N-ethylethanamide.
Secondary AMINE + ACYL CHLORIDE => Tertiary AMIDE + HCl gas.
For example: CH3COCl + (CH3CH2)2NH => CH3CON(CH2CH3)2 + HCl
The tertiary amide here is named N,N-diethylethanamide.
SIMILAR REACTIONS OCCUR WITH ACID ANHYDRIDES FORMING AN AMIDE AND ETHANOIC ACID.
For example: CH3COOCOCH3 + CH3CH2NH2 => CH3CONHCH2CH3 + CH3COOH
Find out more here.




