Aminopeptidase that plays a central role in peptide trimming, a step required for the generation of most HLA class I-binding peptides. Peptide trimming is essential to customize longer precursor peptides to fit them to the correct length required for presentation on MHC class I molecules. Strongly prefers substrates 9-16 residues long. Rapidly degrades 13-mer to a 9-mer and then stops. Preferentially hydrolyzes the residue Leu and peptides with a hydrophobic C-terminus, while it has weak activity toward peptides with charged C-terminus. May play a role in the inactivation of peptide hormones. May be involved in the regulation of blood pressure through the inactivation of angiotensin II and/or the generation of bradykinin in the kidney. {ECO:0000269|PubMed:15908954, ECO:0000269|PubMed:16286653, ECO:0000269|PubMed:21478864}. This is the function of ERAP1 (endoplasmic reticulum aminopeptidase 1, ENSG00000164307).