Let ${M_i}_{iin mathbb{Z}}$ be an index family of $R$-modules. Then we know that the direct sum $ bigoplus_{iin mathbb{Z}}M_i$ is a submodule of a direct product $ prod_{iin mathbb{Z}}M_i$. Let $N$ be an $R$-module and if $$f:bigoplus_{iin mathbb{Z}}M_ito N$$ is any linear map. Can we always extend $f$ to a linear map $$tilde{f}:prod_{iin mathbb{Z}}M_ito N .$$ That is, $tilde{f}$ is a linear map such that $$tilde{f}|_{bigoplus_{iin mathbb{Z}}M_i} = f.$$ I know in vector spaces we can always construct $tilde{f}$ with the help of a basis, but in general modules how do we proceed?

Secondly, if some $f$ has an extention to $tilde{f}$, is $tilde{f}$ unique?