As a new class of non-volatile memory, resistive random access memory (RRAM) offers not only superior electronic characteristics, but also advanced functionalities, such as transparency and radiation hardness. However, the environmental tolerance of RRAM is material-dependent, and therefore the materials used must be chosen carefully in order to avoid instabilities and performance degradation caused by the detrimental effects arising from environmental gases and ionizing radiation. In this work, we demonstrate that AlN-based RRAM displays excellent performance and environmental stability, with no significant degradation to the resistance ratio over a 100-cycle endurance test. Moreover, transparent RRAM (TRRAM) based on AlN also performs reliably under four different harsh environmental conditions and 2 MeV proton irradiation fluences, ranging from 1011 to 1015 cm-2. These findings not only provide a guideline for TRRAM design, but also demonstrate the promising applicability of AlN TRRAM for future transparent harsh electronics.