Traditional wireless data aggregation (WDA) technology based on the principle of separated communication and computation is difficult to achieve large-scale access under the limited spectrum resources, especially in scenarios with strict constraints on time latency (e.g. autonomous driving). To solve this problem, Over-the-Air Computation (AirComp) has emerged as a new fast WDA solution. AirComp can perform ultra-high-speed wireless data aggregation in the scenario of limited communication capacity. In this paper, to overcome the disadvantage of wireless channel propagation, we use reconfigurable intelligent surface (RIS) to assist AirComp. As far as we know, most of the research on AirComp is focused on optimizing aggregation errors. Most edge devices of the Internet of Things (IoT) are battery-powered. Therefore, optimizing the transmit power of devices could prolong the life cycle of nodes and save the system power consumption. In this paper, we aim for minimizing the system transmit power subject to maximum tolerable aggregation error constraint, while ensuring that each device rate meets the minimum rate constraint. Unfortunately, the problem presented is a very tricky non-convex problem. To solve the proposed thorny problem, we propose a two-step optimization method. Specifically, we introduce matrix lifting technology to transform the original problems into semidefinite programming problems (SDP) in the first step and then propose an alternate difference-of-convex (DC) framework to solve SDP subproblems. The numerical results show that RIS-assisted communication can greatly save system power and reduce aggregation error. And the proposed alternate DC method is superior to the alternate SDR method.