# Lambda function URLs

> My favourite way to put Lambda on the internet. Every MVP starts here.

- Verdict: My default
- Vendor: AWS
- Layer: [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events.md). Job: HTTP front door for Lambda
- Last reviewed: 18 October 2026, by Nicolas Dao (Cloudless Labs, Sydney)
- Web page: https://cloudlesslabs.com/stack/aws-lambda-function-urls/. The whole stack in one file: https://cloudlesslabs.com/stack/brief.md

API Gateway is often extra cost and config for features nobody uses. A function URL is free and enough for most things. I only reach for API Gateway when a function URL can't do something, and I decide that case by case.

## Use it when

- You need an HTTPS endpoint for one function, with IAM or app-level auth.
- MVPs, internal APIs, webhooks into AWS.

## Don't use it when

- You need usage plans, API keys per customer, request validation or WAF directly on the endpoint. That's API Gateway territory (or CloudFront or Workers in front).

## Pricing

Free. You pay only for the Lambda invocation.

## Gotchas, with fixes

- **Gotcha:** Response streaming doesn't work through a function URL for a function inside a VPC.
  **Fix:** Keep streaming functions outside the VPC, or use Workers or Lambda Web Functions.

## Provisioning

Official Pulumi package · Official Terraform provider

aws.lambda.FunctionUrl, with invokeMode BUFFERED or RESPONSE_STREAM.

## Instead, consider

- [API Gateway](https://cloudlesslabs.com/stack/aws-api-gateway/index.md): Only when a function URL genuinely can't do it.
- [Cloudflare Workers](https://cloudlesslabs.com/stack/cloudflare-workers/index.md): A global front door with auth, rate limits and bot rules.

## Worked examples

- [Lambda, Web Functions or Workers?](https://cloudlesslabs.com/stack/guides/compute-choice/index.md): Where should this piece of logic run?

## Where it fits

- [An API for my app](https://cloudlesslabs.com/stack/use-cases/api.md): pick 1. Start here. Free front door, one function per concern.
- [A traffic spike I can see coming](https://cloudlesslabs.com/stack/use-cases/flash-sale.md): don't. Not as the front door for the crowd. Function URLs are still my default for normal APIs, and Lambda still does the checkout above. The problem is pointing 50,000 people straight at it: the spike hits Lambda's scaling steps and 1,000-instance default, gets 429s, and every new instance opens a database connection at once. Put the Worker in front and only the winners reach Lambda. Instead: [Cloudflare Workers](https://cloudlesslabs.com/stack/cloudflare-workers/index.md).

## In The Stack Weekly

- [Week 43: Lambda Web Functions](https://cloudlesslabs.com/weekly/2026-w43/index.md), watching

## Sources

- [Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html)

## Related

- [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events.md): every tool in this layer, with its verdict
- [The whole stack in one file](https://cloudlesslabs.com/stack/brief.md): every use case and tool, for questions that span many
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
