Since the middle of the last century, cosmic ray variations have been studied using data from a ground-based network of neutron monitors. To determine the energy spectrum of cosmic rays at the boundary of the magnetosphere, knowledge of the shape of the variation spectrum is required. In this work, to determine the spectrum of proton flux variations, we used the recently published precision AMS-02 daily proton data obtained from 05/2011 on board the ISS. To approximate the spectrum of variations υ(R)= -δJ/J as function of rigidity R, the Ellison-Ramaty formula was used. Fitting parameters were obtained on the daily basis and compared with indexes of solar activity. No transformation of the spectrum was found during the polarity of the solar magnetic field reversal period. There is an anticorrelation between the fitting parameters and the number of sunspots. Alternative ways of studying the spectrum of variations are considered. At the 2nd moment there are annual quasi-periodic fluctuations. Connection of the 3rd moment with solar flares is observed.