This paper studies risk-aware look-ahead and realtime energy procurement to account for forecast errors of renewable energy generation due to the variability and non-dispatchability therein. Energy storage can be used to mitigate the mismatch between the forecast and the actual renewable energy generation. The risk-aware look-ahead and real-time energy procurement problem is formulated as a stochastic dynamic optimization problem, aiming to minimize the average cost of energy procurement. In general, a major challenge of solving dynamic optimization problems lies in the need for the knowledge of future energy requirements and renewable energy generation, and the evaluation of dynamic programming requires solution of a value function that would be computationally difficult when the state space of the system is large and hence suffers from the curse of dimensionality. A low computational online algorithm based on the Lyapunov optimization technique is developed to solve the proposed problem involving a two-stage stochastic linear program. In the first stage, the look-ahead energy procurement is made using the forecast of the renewable energy and the risk associated with forecast errors. In the second stage, upon the realization of the renewable energy generation, the storage charging/discharging and the real-time energy procurement are taken to account for forecast errors. An algorithm based on the L-shaped method is proposed to efficiently compute the decisions. It is shown that the proposed online algorithm can achieve the optimal solution asymptotically. The efficacy of the proposed algorithm is demonstrated through extensive numerical analysis.