Sampling from a Poisson distribution (infinite support) I would like to sample from an infinite discrete distribution, i.e. Poisson distribution
\begin{align}
\Bbb P(X=k)=e^{-\lambda}\frac{\lambda^k}{k!}
\end{align}
where $\lambda$ is a fixed parameter.
In case of a finite distribution I could use ALIAS method, but it doesn't work in this case. I've found that I could use a transformation
\begin{align}
X=\min\{ k: U \leq \sum\limits_{i=1}^n p_i \}
\end{align}
but is that the way to go?

Yes, exactly. This is known as inverse transform sampling, and this earlier thread may be helpful.
Actually, you have a typo in your formula (note that there is only a single $k$ and a single $n$ in your formula). What you would do is to generate a value $p$ that is uniformly distributed in $[0,1]$, and then the resulting Poisson variable $k$ is the smallest $k$ such that $\sum_{i=0}^kp_i\geq p$. You would of course pre-tabulate your $p_i$ up to some sufficiently large number, so you don't need to recalculate them multiple times.
