Amino acids are the essential molecular components of living organisms on Earth, but the proposed mechanisms for their spontaneous generation have been unable to account for their presence in Earth's early history. The delivery of extraterrestrial organic compounds has been proposed as an alternative to generation on Earth, and some amino acids have been found in several meteorites. Here we report the detection of amino acids in the room-temperature residue of an interstellar ice analogue that was ultraviolet-irradiated in a high vacuum at 12 K. We identified 16 amino acids; the chiral ones showed enantiomeric separation. Some of the identified amino acids are also found in meteorites. Our results demonstrate that the spontaneous generation of amino acids in the interstellar medium is possible, supporting the suggestion that prebiotic molecules could have been delivered to the early Earth by cometary dust, meteorites or interplanetary dust particles.