If you are let's say creating multiple functions (call them prime functions) for an app and they use the same code for their work. If you then extract the same code and make it its own function (sub-functions) and use it, are you charged for these sub-functions when you call the prime functions?
For example, if I am sending an email on different occasions to users. So, I make a new function that can only be called from inside the prime function, let's say an HTTP request. But the email function is never exposed to the HTTP request directly. So, when I use a function that in turn uses this email function, am I charged for just one invocation or for both, the HTTP request function and email function.
I know that they incur costs when they use the compute but the question is in terms of invocation?