Catalysis of ATP-dependent isopeptide bond formation between the carboxy-terminal residues of a small conjugating protein such as ubiquitin or a ubiquitin-like protein, and a substrate lysine residue. This function may be performed alone or in conjunction with an E3, ubiquitin-like protein ligase.