In the category of $\mathbb{Z}$-modules, there exists a module $A$---for instance $\bigoplus\_{k=2}^\infty \mathbb{Z}/k\mathbb{Z}$---such that a $\mathbb{Z}$-module $B$ is injective iff $\operatorname{Ext}^1\_\mathbb{Z}(A,B)=0$.


Does this hold if $\mathbb{Z}$ is replaced with an arbitrary (unital) ring $R$? If not, what are some sufficient conditions on $R$ for this to hold?


As a comment, note that this is equivalent to requiring the existance of a family $\{A\_j\}\_{j\in J}$ of $R$-modules indexed by some *set* $J$ such that an $R$-module $B$ is injective iff $\operatorname{Ext}^1\_R(A\_j,B)=0$ for all $j\in J$: This is clearly implied by the original statement. To get the other direction, set $A:=\bigoplus\_{j\in J} A\_j$. Then $$\operatorname{Ext}^1\_R(A,B)=\prod\_{j\in J} \operatorname{Ext}^1\_R(A\_j, B)=0$$ since each component is $0$.



Is there an $A$ such that $B$ injective iff 1st Ext functor vanishes?
Yes, such a module exists for each unital ring $R$: Take $A= \bigoplus\_I R/I$ where $I$ runs through the left ideals of $R$. This is because $B$ is injective iff $\text{Ext}^1\_R(R/I,B)=0$ for each $I$ (Weibel, Lemma 4.1.11). Also note that this is a straightforward generalization of your example $R=\mathbb{Z}$. 


**Added:** If $R$ is a Noetherian commutative ring, you can also take $A=\bigoplus\_P R/P$ where $P$ runs through the prime ideals of $R$ (Bruns, Herzog: Cohen-Macaulay rings, 3.1.12). 


