# CfnWebFunctionProps

Properties for defining a `CfnWebFunction`.

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

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 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';
const cfnWebFunctionProps: lambda.CfnWebFunctionProps = {
  functionName: 'functionName',

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# 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_

cfn_web_function_props = lambda.CfnWebFunctionProps(
    function_name="functionName",

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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.*;

CfnWebFunctionProps cfnWebFunctionProps = CfnWebFunctionProps.builder()
        .functionName("functionName")

        // the properties below are optional
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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;

var cfnWebFunctionProps = new CfnWebFunctionProps {
    FunctionName = "functionName",

    // the properties below are optional
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnWebFunctionProps := &CfnWebFunctionProps{
	FunctionName: jsii.String("functionName"),

	// the properties below are optional
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `functionName`: string (required) — The name of the web function.

  The name can contain letters, numbers, hyphens (-), and underscores (_), and cannot begin or end with a hyphen or an underscore. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags to apply to the function.
