$A$ be a commutative ring with $1$ with finitely many minimal primes $\{p_1,\ldots,p_n\}.$ Then how can I show that $S^{-1}A \cong A_{p_1} \times\cdots \times A_{p_n},$ where $S=A \setminus \bigcup_{i=1}^{n}p_{i}.$
So far I could prove that $\text{Spec}(S^{-1}A)=\text{Max}(S^{-1}A)=\{A_{p_1},\ldots,A_{p_n}\}$ and there exists a natural map $S^{-1}A \to A_{p_1} \times \cdots \times A_{p_n}$ , which exists by universal property of localization. How can I show that the natural map in injective as well as surjective?