AWSAWS LambdaServerless

aws_lambda_function_url cost estimation

A Lambda function URL is free. It gives a function a public HTTPS endpoint with no API Gateway, and the cost is the function invocations that requests trigger.

An aws_lambda_function_url attaches a dedicated HTTPS endpoint directly to a Lambda function, so callers can invoke it over the web without an API Gateway or load balancer in front. The URL costs nothing to create and nothing per request as an endpoint. It is the cheap way to expose a single function, because it removes the per-request and hourly charges an API Gateway would add.

The cost is the function behind the URL. Each HTTP request to the URL is a Lambda invocation billed per request and per GB-second of duration from the function's memory and run time. If the function does light work at low volume, the endpoint is nearly free. The cost tracks request volume and how heavy each invocation is, exactly like any other Lambda trigger.

The trade-off versus API Gateway is features, not just price. Function URLs give you a plain HTTPS endpoint with optional IAM auth; they do not provide usage plans, request validation, custom domains without extra wiring, or fine-grained throttling. For a webhook receiver or a simple internal endpoint, the URL is both simpler and cheaper. c3x prices the target function by its invocation volume and duration and treats the function URL as the free front door it is.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_lambda_function_url" "api" {
  function_name      = aws_lambda_function.api.function_name
  authorization_type = "NONE"

  cors {
    allow_origins = ["https://example.com"]
    allow_methods = ["GET", "POST"]
  }
}

Pricing dimensions

What you actually pay for when you provision aws_lambda_function_url.

DimensionUnitWhat's being charged
Function URLfreeThe HTTPS endpoint itself has no per-request or hourly charge.
$0
Function invocationsper 1M requestsEach request to the URL invokes the function, billed per invocation.
$0.20 per 1M requests
Function durationper GB-secondMemory times run time for each invocation the URL triggers.
$0.0000166667/GB-second

Optimization tips

Common ways to reduce aws_lambda_function_url cost without changing the workload.

Use a function URL instead of API Gateway for simple endpoints

Removes API Gateway request cost entirely

For a single webhook or internal endpoint, a function URL avoids API Gateway's per-request and hourly charges while giving the same public HTTPS access.

Right-size the function's memory

Duration is billed per GB-second, so the function's memory setting drives cost per request. Tune it to the lowest value that keeps latency acceptable.

Protect against abusive traffic

A public URL with authorization_type NONE can be hit by bots, and every hit is a billed invocation. Add IAM auth or front it with a CDN or WAF if it is exposed to the open internet.

FAQ

Does a Lambda function URL cost money?

No. The function URL is free as an endpoint, with no per-request or hourly charge. You pay only for the Lambda invocations the requests trigger, billed per request and per GB-second of duration.

Is a function URL cheaper than API Gateway?

Yes. API Gateway adds a per-request charge (and hourly cost for some types), while a function URL adds nothing beyond the Lambda invocation. For simple endpoints the URL is the cheaper front door.

What is the cost risk of a public function URL?

Abusive or bot traffic. With authorization_type NONE, every hit is a billed invocation, so an exposed URL can run up Lambda cost. Add IAM auth or put a CDN or WAF in front if it faces the internet.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_lambda_function_url.