We present precision measurements of primary and secondary cosmic rays by Alpha Magnetic Spectrometer in the rigidity range up to several TV. These measurements are based on high statistics nuclei samples collected by AMS during the first 7 years of operation aboard the International Space Station. Surprisingly, at ~200 GV all the measured nuclei spectra experience progressive hardening over the rigidity interval of few hundred GV. This hardening is more pronounced for the secondary nuclei such as lithium, beryllium, and boron than for the primary nuclei as helium, carbon and oxygen. The properties of cosmic ray nuclei isotopes will also be discussed.