In the present paper we find a linear operator on a function space, essentially larger than the space of all bounded functions on an amenable semigroup, which behaves like an invariant mean. This leads to an extension of the Hyers-Ulam stability theorem for Cauchy's functional equation in the case of vector-valued mappings defined on amenable semigroups.