Let G be a semi-simple simply connected group over C. Following Gerasimov et al. (CommMath Phys 294: 97-119, 2010) we use the q-Toda integrable system obtained by quantum group version of the Kostant-Whittaker reduction (cf. Etingof in Am Math Soc Trans Ser 2: 9-25, 1999, Sevostyanov in CommunMath Phys 204: 116, 1999) to define the notion of q-Whittaker functions Psi(lambda boolean OR)(q, z). This is a family of invariant polynomials on the maximal torus T subset of G (here z is an element of T) depending on a dominant weight lambda(boolean OR) of G whose coefficients are rational functions in a variable q is an element of C*. For a conjecturally the same (but a priori different) definition of the q-Toda system these functions were studied by Ion (Duke Math J 116: 299-318, 2003) and by Cherednik (Int Math Res Notices 20: 3793-3842, 2009) [ we shall denote the qWhittaker functions from Cherednik (Int Math Res Notices 20: 3793-3842, 2009) by Psi(lambda boolean OR)' (q, z)]. For G = SL(N) these functions were extensively studied in Gerasimov et al. (Comm Math Phys 294: 97-119, 2010; Comm Math Phys 294: 121-143, 2010; Lett Math Phys 97: 1-24, 2010). We show that when G is simply laced, the function (Psi) over cap (lambda boolean OR) (q, z) = Psi(lambda boolean OR)(q, z) . Pi(i is an element of I) Pi((alpha i, lambda boolean OR))(r=1) (1 - q(r)) (here I denotes the set of vertices of the Dynkin diagram of G) is equal to the character of a certain finite-dimensional G[[t]] X C*-module D(lambda(boolean OR)) (the Demazure module). When G is not simply laced a twisted version of the above statement holds. This result is known for Psi(lambda boolean OR) replaced by Psi(lambda boolean OR)' (cf. Sanderson in J Algebraic Combin 11: 269-275, 2000 and Ion in Duke Math J 116: 299-318, 2003); however our proofs are algebro-geometric [and rely on our previous work (Braverman, Finkelberg in Semi-infinite Schubert varieties and quantum K-theory of flag manifolds, arXiv/1111.2266, 2011)] and thus they are completely different from Sanderson (J Algebraic Combin 11: 269-275, 2000) and Ion (Duke Math J 116: 299-318, 2003) [in particular, we give an apparently new algebro-geometric interpretation of the modules D(lambda boolean OR())].