  We compute $1/\lambda$ corrections to the four-point functions of half-BPS
operators in $SU(N)$ $\mathcal{N}=4$ super-Yang-Mills theory at large $N$ and
large 't Hooft coupling $\lambda=g_\text{YM}^2 N$ using two methods. Firstly,
we relate integrals of these correlators to derivatives of the mass deformed
$S^4$ free energy, which was computed at leading order in large $N$ and to all
orders in $1/\lambda$ using supersymmetric localization. Secondly, we use
AdS/CFT to relate these $1/\lambda$ corrections to higher derivative
corrections to supergravity for scattering amplitudes of Kaluza-Klein scalars
in IIB string theory on $AdS_5\times S^5$, which in the flat space limit are
known from worldsheet calculations. These two methods match at the order
corresponding to the tree level $R^4$ interaction in string theory, which
provides a precise check of AdS/CFT beyond supergravity, and allow us to derive
the holographic correlators to tree level $D^4R^4$ order. Combined with
constraints from arXiv:1809.10670, our results can be used to derive CFT data
to one-loop $D^4R^4$ order. Finally, we use AdS/CFT to fix these correlators in
the limit where $N$ is taken to be large while $g_{\rm YM}$ is kept fixed. In
this limit, we present a conjecture for the small mass limit of the $S^4$
partition function that includes all instanton corrections and is written in
terms of the same Eisenstein series that appear in the study of string theory
scattering amplitudes.
