  This paper presents a measurement of the double-differential cross section
for the Drell-Yan $Z/\gamma^{*} \rightarrow \ell^{+} \ell^{-}$ and
photon-induced $\gamma\gamma \rightarrow \ell^{+} \ell^{-}$ processes where
$\ell$ is an electron or muon. The measurement is performed for invariant
masses of the lepton pairs, $m_{\ell\ell}$, between 116 GeV and 1500 GeV, using
a sample of 20.3 fb$^{-1}$ of pp collisions data at centre-of-mass energy of
$\sqrt{s}$ = 8 TeV collected by the ATLAS detector at the LHC in 2012. The data
are presented double differentially in invariant mass and absolute dilepton
rapidity as well as in invariant mass and absolute pseudorapidity separation of
the lepton pair. The single-differential cross section as a function of
$m_{\ell\ell}$ is also reported. The electron and muon channel measurements are
combined and a total experimental precision of better than 1% is achieved at
low $m_{\ell\ell}$. A comparison to next-to-next-to-leading order perturbative
QCD predictions using several recent parton distribution functions and
including next-to-leading order electroweak effects indicates the potential of
the data to constrain parton distribution functions. In particular, a large
impact of the data on the photon PDF is demonstrated.
