Using 6.32 fb-1 of e+e- collision data collected by the BESIII detector at the center-of-mass energies between 4.178 and 4.226 GeV, an amplitude analysis of the Ds+→KS0K-π+π+ decays is performed for the first time to determine the intermediate-resonant contributions. The dominant component is the Ds+→K∗(892)+K̄∗(892)0 decay with a fraction of (40.6±2.9stat±4.9sys)%. Our results of the amplitude analysis are used to obtain a more precise measurement of the branching fraction of the Ds+→KS0K-π+π+ decay, which is determined to be (1.46±0.05stat±0.05sys)%. © 2021 authors. Published by the American Physical Society.