Ambient Internet of Things (A-IoT), which harnesses ambient backscatter communication, has emerged as a critical technology for sixth-generation (6G) mobile networks. In this study, we introduce a novel heterogeneous network-oriented system that integrates reconfigurable intelligent surfaces (RIS) with A-IoT devices. The system's complexity arises from the highly obstructed environments where signals undergo multiple reflections via the IRS before reaching the receiver, resulting in a non-trivial optimization challenge. To tackle this issue, we propose a sophisticated alternating optimization algorithm that leverages machine learning principles to approximate the optimal solution for maximizing system throughput. Our analysis assumes Rayleigh-distributed channel gains for both forward and backscatter links. Through rigorous numerical analysis and simulation, we delve into the intricacies of how various system parameters impact rate performance. The simulation results reveal that the integration of RIS in A-IoT systems significantly reduces the required transmit power at base stations while enhancing the overall communication efficiency. Furthermore, our proposed algorithm exhibits superior performance when compared to existing methods, achieving comparable optimization results with reduced computational overhead. This underscores its potential for enabling cost-effective, energy-efficient, and low-complexity communication solutions in future 6G networks.