TITLE: Abstract proof that $\lvert H^2(G,A)\rvert$ counts group extensions
QUESTION [8 upvotes]: (This question is originally from Math.SE, where it didn't receive any answers.)
$\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\ext}{Ext}
\newcommand{\Z}{\mathbb{Z}}$
Let $G$ be a group, let $A$ be a $G$-module, and let $P_3\to P_2\to P_1\to P_0\to\Z\to0$ be the start of a projective resolution of the $G$-module $\mathbb{Z}$. Consider the cohomology group
$$H^2(G,A)=\frac{\ker(\Hom_{\Z G}(P_2,A)\to\Hom_{\Z G}(P_3,A))}{\im(\Hom_{\Z G}(P_1,A)\to\Hom_{\Z G}(P_2,A))}.$$
It can be shown that $\lvert H^2(G,A)\rvert$ counts the number of equivalence classes of group extensions $0\to A\to E\to G\to0$.
The only proof that I know of this result involves choosing a specific projective resolution (namely, the bar resolution).

Is there a proof of this result that does not require choosing a specific projective resolution?

For context, $\lvert\ext_R^n(M,N)\rvert$ counts the number of equivalence classes of extensions $0\to N\to X_n\to\ldots\to X_1\to M\to0$. The proof of this result is fairly abstract and does not require picking a specific projective resolution of $M$ or a specific injective resolution of $N$.
Also, I am aware that we actually have isomorphisms in both of these results but I am more interested in the existence of an explicit bijection.

Here is one approach for constructing an element of $H^2(G,A)$ from an extension $0\to A\to E\to G\to0$: Treat $A$ as an $E$-module and consider the transgression map $H^1(A,A)^{E/A}\to H^2(E/A,A^A)$.
Rewriting this gives a homomorphism $\Hom(A,A)^G\to H^2(G,A)$.
The image of $\id_A$ under this map will be an element of $H^2(G,A)$.
To make this work, this map would need to be a bijection from equivalence classes of group extensions and elements of $H^2(G,A)$.

Another approach that I considered was to work directly with the arbitrary projective resolution (similar to the proof of the Yoneda Ext result).
Suppose that we are given a group extension $0\to A\to E\to G\to0$.
We want to construct an element of $\ker(\Hom_{\Z G}(P_2,A)\to\Hom_{\Z G}(P_3,A))$.
Equivalently, we want to construct a $\Z G$-module homomorphism $P_2/\im(P_3\to P_2)\to A$.
However, $\im(P_3\to P_2)=\ker(P_2\to P_1)$ and $P_2/\ker(P_2\to P_1)\cong\im(P_2\to P_1)=\ker(P_1\to P_0)$.
Thus, we want to construct a $\Z G$-module homomorphism $f\colon\ker(P_1\to P_0)\to A$.
Furthermore, if we unwind some more definitions, we see that we only need to construct $f$ up to the restriction of a $\Z G$-module homomorphism $P_1\to A$.
Unfortunately, the only information we have about $A$ is the short exact sequence $0\to A\to E\to G\to0$ which makes it hard to define a $\Z G$-module homomorphism to $A$.

REPLY [15 votes]: Here is a simple way.  The extension $A \to E \to G$ induces a map of classifying spaces $BA\to BE \to BG$, which is a principal fibration, so classified by (homotopy class of) a map $BG \to BBA=K(A,2)$, i.e., an element of $H^2(BG,A)$.