  We place constraints on sterile neutrino resonant production (RP) and scalar
decay production (SDP) mechanisms assuming that sterile neutrino represents a
fraction from the total Cold Dark Matter energy density. For the cosmological
analysis, we complement the CMB anisotropies measurements with CMB lensing
gravitational potential measurements, that are sensitive to the DM distribution
out to high redshifts and with the cosmic shear data, that constraints the
gravitational potential at lower redshifts than CMB. We show that our datasets
have enough sensitivity to constrain the sterile neutrino mass and mass
fraction inside the co-moving free-streaming horizon in both RP and SDP
scenarios. For RP case we find that the best fit values of sterile neutrino
mass and mixing angle are in the parameter space of interest for sterile
neutrino DM decay interpretation of the 3.5 keV X-ray line with a DM mass
fraction f_S=0.28 \pm 0.3 (at 68% CL) that excludes the assumption of sterile
neutrinos as being all of the DM. For SDP case we find f_S=0.86 \pm 0.07 (at
68% CL), in agreement with the upper limit constraint on f_S from the X-ray
non-detection and Ly-alpha forest measurements. The sterile neutrino mass
predicted by both RP and SDP models are consistent within 0.3 \sigma.
