You should think of the exponential function as being the primitive object. It is the inverse to the logarithm $\log:(0,\infty)\rightarrow\mathbf{R}$ (when I write $\log$ I mean the natural log, also denoted sometimes as $\ln$, not the base 10 logarithm). That is, $\log(e^x))=x$ and $e^{\log(y)}=y$ for $x\in\mathbf{R}$ and $y\in(0,\infty)$.
If you know what the exponential function is, then you can understand the function given by sending $x$ to $a^x$ for a positive real number $a$. By definition, $a^x$ means $e^{x\log(a)}$. Remember that here $\log(a)$ is just a number, the (natural) logarithm of $a$. Keeping this in mind, and remembering that the derivative of the exponential function is exist, you can use the chain rule to derive
$(d/dx)(a^x)=(d/dx)(e^{x\log(a)})=e^{x\log(a)}(d/dx)(x\log(a))=\log(a)e^{x\log(a)}=\log(a)a^x$.