# WebFunctionEndpointOptions

Settings of a WebFunction endpoint.

Extends: WebFunctionEndpointOptions
Extends: WebFunctionDefaultEndpointOptions

- Source: [`aws-lambda/lib/webfunction-endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/aws-lambda/lib/webfunction-endpoint.ts#L200)
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

```ts
declare const fn: lambda.WebFunction;

const internal = fn.addEndpoint('Internal', {
  authType: lambda.WebFunctionAuthType.IAM_AUTH,
});
```

## Properties

- `authType`: [WebFunctionAuthType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionAuthType.html) (required) — The authentication type for the WebFunction endpoint.

  There is no default: you must choose explicitly so an endpoint is never accidentally public or
  accidentally locked down. Specify `WebFunctionAuthType.IAM_AUTH` (Lambda authorizes requests with SigV4/IAM)
  or `WebFunctionAuthType.APPLICATION_MANAGED` (the endpoint is public and your function handles authorization).

  With `IAM_AUTH`, requests must be signed with SigV4 and carry the `X-Amz-Content-SHA256`
  header, also for a request without a body; without it the endpoint returns 403 even for a
  valid signature. A `MULTI_REGION` endpoint is signed with SigV4a, for the Region set `*`.

- `endpointDescription`: string — A description of the endpoint.

  **Default:** No description.

  Up to 256 characters.

- `endpointLocation`: [WebFunctionEndpointLocation](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpointLocation.html) — Where the endpoint serves traffic: the home Region only, or a set of replica Regions.

  **Default:** WebFunctionEndpointLocation.homeRegion()

  Changing it replaces the endpoint, which yields a new `domainName`. If you set
  `endpointName`, change it at the same time.

- `endpointName`: string — The name of the WebFunction endpoint.

  **Default:** for the endpoint a WebFunction creates, `prod` in the home Region and, for a regional endpoint, `prod-` followed by a hash of its location; for any other endpoint, a name derived from its construct path and location

  Must be 2 to 64 characters of letters, numbers, hyphens or underscores, starting and
  ending with a letter or number.

  Changing this property replaces the endpoint, which yields a new `domainName`.

  `endpointLocation` also replaces the endpoint when it changes, and CloudFormation cannot
  replace a resource that keeps its name. Without this property the name is derived from the
  location, so that works. With it, change the name together with the location, or the
  deployment fails.

- `maxEnvironments`: number — The maximum number of concurrent execution environments for the endpoint.

  **Default:** Scaling is limited only by your account's vCPU quota.

  This is an optional cap on top of your account's vCPU quota, not a reservation:
  it further constrains how far the endpoint scales. Must be 2 or greater.

- `rateLimit`: number — The maximum request rate per second for the endpoint, up to 10000.

  **Default:** The request rate is limited only by your account's rate limit quota.

  This is an optional cap on top of your account's rate limit quota. Specify 0 to
  reject all new requests.

  The service accepts only certain values: 0, 100 through 1000 in increments of 100,
  and 2000 through 10000 in increments of 1000. Which of those are available varies by
  Region, and an unsupported value is rejected at deploy time with the values that
  Region does accept. Only the lower bound is checked at synth, since the schema
  declares nothing more.
