A measurement of the cosmic ray anisotropy on the arrival directions of elementary particles (electrons, positrons and protons) and light nuclei (helium, carbon and oxygen) has been performed in galactic coordinates by the Alpha Magnetic Spectrometer onboard the International Space Station. The analysis is based on the sample of events collected in the first 6.5 years (electrons and positrons), and 7.5 (protons, helium, carbon and oxygen) of data taking. The results are consistent with isotropy for all cosmic ray species and upper limits on the dipole amplitude have been computed. In particular, 95% credible interval upper limits of δ < 1.9% and δ < 0.5% are obtained for positrons and electrons, respectively, above 16 GeV. On the other hand, the upper limits of protons, helium, carbon and oxygen above 200 GV are found to be δ < 0.38%, δ < 0.36%, δ < 1.9% and δ < 1.7%, respectively.