Catalysis of the release of amides by the cleavage of a carbon-nitrogen bond or the reverse reaction with an amine as a substrate.