The impact of prolonged irradiation and air humidity on the stability of perovskite solar cells was reported using X-ray diffraction (XRD) and X-ray photoelectron spectroscopy (XPS) patterns in the literature. The purpose of this study is to confirm the structural change dependence on temperature during formation of the perovskite structure using in-situ grazing-incidence X-ray diffraction (GIXD). Furthermore, we performed ex-situ GIXD measurements to observe long-term structural stability of thin film under sun-light and air atmosphere.