Amorphous As2S8 chalcogenide glass is shown to undergo changes in refractive index upon exposure to ultraviolet (UV) light. As2S8 film properties are studied, which were measured with testing techniques of prism coupler, x-ray diffraction spectrum and Raman spectra. It is found that the refractive index increases and the thickness decreases after UV light irradiation. The visible optical absorption spectra show that photo-darkening does not exist in the As2S8 film. Based on the study of these phenomena, the UV light irradiation technique is presented and employed for fabricating an As2S8 stripe waveguide, which is shown to be an effective guided mode device with a useful switching functionality based on the photo-optical effect, such as an all-optical attenuator.