# WebFunctionEndpointType

The endpoint type for a WebFunction endpoint.

Choose it with `WebFunctionEndpointLocation` when defining an endpoint.

- 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#L19)
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
const endpoint = lambda.WebFunctionEndpoint.fromWebFunctionEndpointAttributes(this, 'Endpoint', {
  endpointArn: 'arn:aws:lambda:us-west-2:123456789012:web-function/my-function/endpoint/prod',
  domainName: 'abcd1234.lambda-web.us-west-2.on.aws',
  endpointType: lambda.WebFunctionEndpointType.HOME_REGION,
  authType: lambda.WebFunctionAuthType.IAM_AUTH,
});
```

Python:

```python
endpoint = lambda_.WebFunctionEndpoint.from_web_function_endpoint_attributes(self, "Endpoint",
    endpoint_arn="arn:aws:lambda:us-west-2:123456789012:web-function/my-function/endpoint/prod",
    domain_name="abcd1234.lambda-web.us-west-2.on.aws",
    endpoint_type=lambda_.WebFunctionEndpointType.HOME_REGION,
    auth_type=lambda_.WebFunctionAuthType.IAM_AUTH
)
```

Java:

```java
IWebFunctionEndpoint endpoint = WebFunctionEndpoint.fromWebFunctionEndpointAttributes(this, "Endpoint", WebFunctionEndpointAttributes.builder()
        .endpointArn("arn:aws:lambda:us-west-2:123456789012:web-function/my-function/endpoint/prod")
        .domainName("abcd1234.lambda-web.us-west-2.on.aws")
        .endpointType(WebFunctionEndpointType.HOME_REGION)
        .authType(WebFunctionAuthType.IAM_AUTH)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var endpoint = WebFunctionEndpoint.FromWebFunctionEndpointAttributes(this, "Endpoint", new WebFunctionEndpointAttributes {
    EndpointArn = "arn:aws:lambda:us-west-2:123456789012:web-function/my-function/endpoint/prod",
    DomainName = "abcd1234.lambda-web.us-west-2.on.aws",
    EndpointType = WebFunctionEndpointType.HOME_REGION,
    AuthType = WebFunctionAuthType.IAM_AUTH
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
endpoint := lambda.WebFunctionEndpoint_FromWebFunctionEndpointAttributes(this, jsii.String("Endpoint"), &WebFunctionEndpointAttributes{
	EndpointArn: jsii.String("arn:aws:lambda:us-west-2:123456789012:web-function/my-function/endpoint/prod"),
	DomainName: jsii.String("abcd1234.lambda-web.us-west-2.on.aws"),
	EndpointType: lambda.WebFunctionEndpointType_HOME_REGION,
	AuthType: lambda.WebFunctionAuthType_IAM_AUTH,
})
```

## Members

| Member | Description |
| --- | --- |
| `HOME_REGION` | Single-region endpoint deployed in the stack's region only. |
| `MULTI_REGION` | Multi-region endpoint with managed latency-based routing. |
| `PER_REGION` | Per-region endpoint: a separate regional endpoint is exposed for each replica region (no managed cross-region routing). |

## Referenced by

- [`IWebFunctionEndpoint`](/v2/docs/aws-cdk-lib.aws_lambda.IWebFunctionEndpoint).endpointType
- [`WebFunctionEndpoint`](/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpoint).endpointType
- [`WebFunctionEndpointAttributes`](/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpointAttributes).endpointType
- [`WebFunctionEndpointBase`](/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpointBase).endpointType
- [`WebFunctionEndpointLocation`](/v2/docs/aws-cdk-lib.aws_lambda.WebFunctionEndpointLocation).endpointType
