Skip to content

Is data transfer billed for synchronous Lambda-to-Lambda Invoke within the same region?

0

I'm building a tool that reads a serverless application's call graph and recommends which Lambda functions could be merged into a single deployment. Part of the cost model prices the data that flows between functions, on the basis that merging two functions turns a network call into an in-process one.

I need to know whether that data is actually billed. When function A invokes function B through the Lambda API in the same region (ap-south-1 in my case), is the request or response payload charged as data transfer?

The Lambda pricing page says in-region data transfer is free between Lambda and S3, DynamoDB, SQS, SNS, Kinesis, EFS and several others. Lambda-to-Lambda is not on that list, so I can't tell whether it's an omission or deliberate. The page also says data transferred in and out "from outside the region the function executed" is charged at EC2 rates, which implies same-region is treated differently, but doesn't say what happens for Lambda talking to Lambda.

I checked my own bill and everything reads $0.00, but my usage sits inside the free tier so that can't distinguish "not billed" from "billed and absorbed".

my model currently charges $0.01/GiB on every call that crosses a function boundary, and that term accounts for essentially the entire cost saving the tool reports. If in-region invoke payloads aren't billed, that saving isn't real and I need to rebuild the model around latency and cold start reduction instead. I'd rather find that out from someone who knows than from a user's bill.

1 Answer
0
Accepted Answer

Data transfer for synchronous Lambda-to-Lambda invocations within the same AWS Region is not billed. When one Lambda function invokes another in the same region using the Invoke API in request-response (synchronous) mode, the payload travels through Lambda's internal infrastructure within that region. The invoke payload is secured with TLS 1.2+ while in transit and passes through an isolated internal VPC owned by the Lambda service within the AWS Region. This internal data transfer within the Lambda service infrastructure does not incur data transfer charges.

For your cost model, this means the $0.01/GiB charge you're applying to every cross-function invocation within the same region is not accurate. The cost savings from merging Lambda functions would need to be recalculated based on other factors rather than data transfer costs. You should focus your model on benefits like reduced invocation costs (since you're eliminating the per-request charges for the intermediate function calls), improved latency from eliminating network hops, and potential cold start reduction when consolidating functions. The Lambda pricing structure charges per request and per millisecond of execution time based on allocated memory, so merging functions would primarily save on the per-request charges and potentially on total execution time if the network overhead is significant.
Sources
Lambda invoke modes - Security Overview of AWS Lambda
Serverless Computing - AWS Lambda Functions - Amazon Web Services

answered a month ago

EXPERT

reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.