Functions as a protein modifier covalently attached to lysine residues of substrate proteins, as well as a sulfur carrier in tRNA thiolation. The protein modification process is termed sampylation and involves the formation of an isopeptide bond between the SAMP2 C-terminal glycine carboxylate and the epsilon-amino group of lysine residues on target proteins. Is able to form polymeric chains with itself at Lys-58, similar to ubiquitin and other ubiquitin-like proteins. May serve as a proteolytic signal in the cell to target proteins for degradation by proteasomes. Monomer (PubMed:23821306). Monomeric and polymeric forms interact with NcsA (PubMed:24906001). The C-terminal glycine is likely acyl-adenylated (-COAMP) by UbaA, and also probably thiocarboxylated (-COSH) to function in sulfur transfer. Cells lacking this gene grow similarly to wild-type in the presence of either DMSO or oxygen as the terminal electron acceptor, but are retarded in aerobic growth at 50 degrees Celsius. The lysine tRNAs of the mutant strain appear to be nonthiolated.