The minimal integer $s$ such that $\ker (A -\lambda I)^s = \ker (A - \lambda I)^{s+1}$ is precisely the largest power of $x-\lambda$ which divides the minimal polynomial of $A$. This is in general $\le $ than the algebraic multiplicity of $\lambda$.
Recall that in general holds
$\ker T \subseteq \ker T^2 \subseteq \ker T^3 \subseteq \cdots$ and that if $\ker T^m = \ker T^{m+1}$ then $\ker T^m = \ker T^{n}, \forall n \ge m$.
The rest follows from this lemma:
Let $A : V \to V$ be a linear map on a finite-dimensional complex vector space $V$ with the eigenvalues $\{\lambda_1, \ldots, \lambda_r\}$. Then a polynomial $p(x) = (x-\lambda_1)^{m_1}\cdots (x-\lambda_r)^{m_r}$ annihilates the map $A$ if and only if $$V = \ker (A-\lambda_1 I)^{m_1} \,\dot+\,\cdots \,\dot+\,\ker(A-\lambda_r I)^{m_r}$$
The direction $\impliedby$ is more-less obvious, and for $\implies$ you can use the partial fraction decomposition of $\frac1{p(x)}$. Note that this sum is always direct, i.e. we have $\ker (A-\lambda_i I)^{m_i} \cap \ker (A-\lambda_j I)^{m_j} = \{0\}, \forall i \ne j$ so you just need to prove that the sum is equal to $V$.
Let $\mu_A(x) = (x-\lambda_1)^{s_1}\cdots (x-\lambda_r)^{s_r}$ be the minimal polynomial of $A$. Then by the lemma we conclude
$$V = \ker (A-\lambda_1 I)^{s_1} \,\dot+\,\cdots \,\dot+\,\ker(A-\lambda_r I)^{s_r}$$
Let $m_i\ge s_i$. Then clearly $(x-\lambda_1)^{m_1}\cdots (x-\lambda_r)^{m_r}$ also annihilates $A$ so
$$V = \ker (A-\lambda_1 I)^{m_1} \,\dot+\,\cdots \,\dot+\,\ker(A-\lambda_r I)^{m_r}$$
Now $$\sum_{i=1}^r \dim\ker (A-\lambda_i I)^{m_i} = \dim V = \sum_{i=1}^r \dim\ker (A-\lambda_i I)^{s_i}$$ implies $\dim\ker (A-\lambda_i I)^{m_i} = \dim\ker (A-\lambda_i I)^{s_i}$ so $\ker (A-\lambda_i I)^{m_i} = \ker (A-\lambda_i I)^{s_i}$ for all $i = 1,\ldots, r$.
On the other hand, if $k_i \le s_i$ and we assume $\ker (A - \lambda I)^{k_i} = \ker (A - \lambda I)^{s_i}$, then we have
$$V = \ker (A-\lambda_1 I)^{k_1} \,\dot+\,\cdots \,\dot+\,\ker(A-\lambda_r I)^{k_r}$$
so the lemma implies that the polynomial $p(x) = (x-\lambda_1)^{k_1}\cdots (x-\lambda_r)^{k_r}$ annihilates $A$. Hence the minimal polynomial divides $p $ so $k_i = s_i$ for all $i = 1, \dots, n$.