Your proposed method works. Let $U$ have uniform distribution on $(0,1)$, and let $X=-\frac{\log U}{\lambda}.$ Then $P(X \le x)=P(-\log U \le \lambda x)=P(\log U \ge - \lambda x)=P(U \ge e^{- \lambda x})=1-e^{-\lambda x}.$ Thus $X$ has cumulative distribution function $F_X(x)=1-e^{- \lambda x}$ (for x>0). It follows that $X$ has density function $\lambda e^{-\lambda x}$ (for x>0).
Thus $X$ has exponential distribution with parameter $\lambda$. Now use the following fact, that I assume has been proved in your course. Suppose that the waiting time between successive occurrences of an event has exponential distribution with parameter $\mu$. Then the number of occurrences of that event in the time interval $[0,T]$ has Poisson distribution with parameter $\mu T$. Take $\mu=\lambda$ and $T=1$.
To apply to your case, let $X_i=-\frac{\log U_i}{\lambda}$. Then $U_1U_2\cdots U_k \ge e^{-\lambda} \quad\text{iff}\quad X_1+X_2 +\cdots +X_k \le 1.$ So if $X_1$ is the waiting time until the first event, and $X_2$ is the waiting time between the first event and the second, and so on, then the random variable $N$ is the number of occurrences of the event in the time interval $[0,1]$. (Since the product of the $U_i$ up to $i=N+1$ is $, the $(N+1)$-th event happens after time $1$.)
Remark: For no good reason, I would prefer to let $X=-\log U$. Then just as above, we conclude that $X$ has exponential distribution with parameter $1$. If waiting times are exponentially distributed with parameter $\mu$, then the number of occurrences of the event in a time interval of length $T$ has Poisson distribution with parameter $\mu T$. In our case, pick $\mu=1$ and $T=\lambda$.