# WebFunctionEndpointProps

Properties for defining a `WebFunctionEndpoint`.

Extends: [WebFunctionEndpointOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpointOptions.html)
Used as props by: [WebFunctionEndpoint](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpoint.html)

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

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { aws_lambda as interfaces_lambda } from 'aws-cdk-lib/interfaces';

declare const webFunctionEndpointLocation: lambda.WebFunctionEndpointLocation;
declare const webFunctionRef: interfaces_lambda.IWebFunctionRef;
declare const webFunctionTraffic: lambda.WebFunctionTraffic;
const webFunctionEndpointProps: lambda.WebFunctionEndpointProps = {
  authType: lambda.WebFunctionAuthType.APPLICATION_MANAGED,
  traffic: webFunctionTraffic,
  webFunction: webFunctionRef,

  // the properties below are optional
  endpointDescription: 'endpointDescription',
  endpointLocation: webFunctionEndpointLocation,
  endpointName: 'endpointName',
  maxEnvironments: 123,
  rateLimit: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_
from aws_cdk.interfaces import aws_lambda as interfaces_lambda

# web_function_endpoint_location: lambda.WebFunctionEndpointLocation
# web_function_ref: interfaces_lambda.IWebFunctionRef
# web_function_traffic: lambda.WebFunctionTraffic

web_function_endpoint_props = lambda.WebFunctionEndpointProps(
    auth_type=lambda_.WebFunctionAuthType.APPLICATION_MANAGED,
    traffic=web_function_traffic,
    web_function=web_function_ref,

    # the properties below are optional
    endpoint_description="endpointDescription",
    endpoint_location=web_function_endpoint_location,
    endpoint_name="endpointName",
    max_environments=123,
    rate_limit=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.interfaces.lambda.*;

WebFunctionEndpointLocation webFunctionEndpointLocation;
IWebFunctionRef webFunctionRef;
WebFunctionTraffic webFunctionTraffic;

WebFunctionEndpointProps webFunctionEndpointProps = WebFunctionEndpointProps.builder()
        .authType(WebFunctionAuthType.APPLICATION_MANAGED)
        .traffic(webFunctionTraffic)
        .webFunction(webFunctionRef)

        // the properties below are optional
        .endpointDescription("endpointDescription")
        .endpointLocation(webFunctionEndpointLocation)
        .endpointName("endpointName")
        .maxEnvironments(123)
        .rateLimit(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.Interfaces.Lambda;

WebFunctionEndpointLocation webFunctionEndpointLocation;
IWebFunctionRef webFunctionRef;
WebFunctionTraffic webFunctionTraffic;

var webFunctionEndpointProps = new WebFunctionEndpointProps {
    AuthType = WebFunctionAuthType.APPLICATION_MANAGED,
    Traffic = webFunctionTraffic,
    WebFunction = webFunctionRef,

    // the properties below are optional
    EndpointDescription = "endpointDescription",
    EndpointLocation = webFunctionEndpointLocation,
    EndpointName = "endpointName",
    MaxEnvironments = 123,
    RateLimit = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var webFunctionEndpointLocation WebFunctionEndpointLocation
var webFunctionRef IWebFunctionRef
var webFunctionTraffic WebFunctionTraffic

webFunctionEndpointProps := &WebFunctionEndpointProps{
	AuthType: awscdk.Aws_lambda.WebFunctionAuthType_APPLICATION_MANAGED,
	Traffic: webFunctionTraffic,
	WebFunction: webFunctionRef,

	// the properties below are optional
	EndpointDescription: jsii.String("endpointDescription"),
	EndpointLocation: webFunctionEndpointLocation,
	EndpointName: jsii.String("endpointName"),
	MaxEnvironments: jsii.Number(123),
	RateLimit: jsii.Number(123),
}
```

## 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.

- `traffic`: [WebFunctionTraffic](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionTraffic.html) (required) — The revisions that receive the endpoint's traffic.

  For a `WebFunction` defined in this app, `WebFunction.addEndpoint()` sets this to the
  function's revision.

- `webFunction`: [IWebFunctionRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_lambda.IWebFunctionRef.html) (required) — The WebFunction the endpoint serves.
