Answer
The function is continuous when $a=2.$
Work Step by Step
$\lim\limits_{x\to2^-}f(x)=(2^-)^3=8.$
$\lim\limits_{x\to2^+}f(x)=a(2^+)^2=4a.$
For the function to be continuous, $\lim\limits_{x\to2^+}f(x)=\lim\limits_{x\to2^-}f(x)\to$
$4a=8\to a=2.$