published on Friday, Nov 20, 2026 by Pulumi
published on Friday, Nov 20, 2026 by Pulumi
A Lambda Web Function and its current immutable revision.
Create WebFunction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebFunction(name: string, args: WebFunctionArgs, opts?: ComponentResourceOptions);@overload
def WebFunction(resource_name: str,
args: WebFunctionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebFunction(resource_name: str,
opts: Optional[ResourceOptions] = None,
code: Optional[WebFunctionCodeArgs] = None,
runtime: Optional[WebFunctionRuntime] = None,
egress_network_connector_version_arn: Optional[str] = None,
environment_variables: Optional[Mapping[str, str]] = None,
execution_role_arn: Optional[str] = None,
function_name: Optional[str] = None,
max_concurrency_per_environment: Optional[float] = None,
tags: Optional[Mapping[str, str]] = None,
timeout_seconds: Optional[float] = None)func NewWebFunction(ctx *Context, name string, args WebFunctionArgs, opts ...ResourceOption) (*WebFunction, error)public WebFunction(string name, WebFunctionArgs args, ComponentResourceOptions? opts = null)
public WebFunction(String name, WebFunctionArgs args)
public WebFunction(String name, WebFunctionArgs args, ComponentResourceOptions options)
type: awsx:lambda:WebFunction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "awsx_lambda_web_function" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args WebFunctionArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WebFunctionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WebFunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebFunctionArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebFunctionArgs
- The arguments to resource properties.
- options ComponentResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var webFunctionResource = new Awsx.Lambda.WebFunction("webFunctionResource", new()
{
Code = new Awsx.Lambda.Inputs.WebFunctionCodeArgs
{
Archive = new FileArchive("./path/to/archive"),
},
Runtime = Awsx.Lambda.WebFunctionRuntime.NodeJS24X,
EgressNetworkConnectorVersionArn = "string",
EnvironmentVariables =
{
{ "string", "string" },
},
ExecutionRoleArn = "string",
FunctionName = "string",
MaxConcurrencyPerEnvironment = 0.0,
Tags =
{
{ "string", "string" },
},
TimeoutSeconds = 0.0,
});
example, err := lambda.NewWebFunction(ctx, "webFunctionResource", &lambda.WebFunctionArgs{
Code: &lambda.WebFunctionCodeArgs{
Archive: pulumi.NewFileArchive("./path/to/archive"),
},
Runtime: lambda.WebFunctionRuntimeNodeJS24X,
EgressNetworkConnectorVersionArn: pulumi.String("string"),
EnvironmentVariables: map[string]pulumi.String{
"string": pulumi.String("string"),
},
ExecutionRoleArn: pulumi.String("string"),
FunctionName: pulumi.String("string"),
MaxConcurrencyPerEnvironment: pulumi.Float64(0),
Tags: map[string]pulumi.String{
"string": pulumi.String("string"),
},
TimeoutSeconds: pulumi.Float64(0),
})
resource "awsx_lambda_web_function" "webFunctionResource" {
lifecycle {
create_before_destroy = true
}
code = {
archive = filearchive("./path/to/archive")
}
runtime = "nodejs24.x"
egress_network_connector_version_arn = "string"
environment_variables = {
"string" = "string"
}
execution_role_arn = "string"
function_name = "string"
max_concurrency_per_environment = 0
tags = {
"string" = "string"
}
timeout_seconds = 0
}
var webFunctionResource = new WebFunction("webFunctionResource", WebFunctionArgs.builder()
.code(WebFunctionCodeArgs.builder()
.archive(new FileArchive("./path/to/archive"))
.build())
.runtime(com.pulumi.awsx.lambda.enums.WebFunctionRuntime.NodeJS24X)
.egressNetworkConnectorVersionArn("string")
.environmentVariables(Map.of("string", "string"))
.executionRoleArn("string")
.functionName("string")
.maxConcurrencyPerEnvironment(0.0)
.tags(Map.of("string", "string"))
.timeoutSeconds(0.0)
.build());
web_function_resource = awsx.lambda_.WebFunction("webFunctionResource",
code={
"archive": pulumi.FileArchive("./path/to/archive"),
},
runtime=awsx.lambda_.WebFunctionRuntime.NODE_JS24_X,
egress_network_connector_version_arn="string",
environment_variables={
"string": "string",
},
execution_role_arn="string",
function_name="string",
max_concurrency_per_environment=float(0),
tags={
"string": "string",
},
timeout_seconds=float(0))
const webFunctionResource = new awsx.lambda.WebFunction("webFunctionResource", {
code: {
archive: new pulumi.asset.FileArchive("./path/to/archive"),
},
runtime: awsx.lambda.WebFunctionRuntime.NodeJS24X,
egressNetworkConnectorVersionArn: "string",
environmentVariables: {
string: "string",
},
executionRoleArn: "string",
functionName: "string",
maxConcurrencyPerEnvironment: 0,
tags: {
string: "string",
},
timeoutSeconds: 0,
});
type: awsx:lambda:WebFunction
properties:
code:
archive:
fn::fileArchive: ./path/to/archive
egressNetworkConnectorVersionArn: string
environmentVariables:
string: string
executionRoleArn: string
functionName: string
maxConcurrencyPerEnvironment: 0
runtime: nodejs24.x
tags:
string: string
timeoutSeconds: 0
WebFunction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WebFunction resource accepts the following input properties:
- Code
Web
Function Code - Application code to deploy.
- Runtime
Pulumi.
Awsx. Lambda. Web Function Runtime - Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- Egress
Network stringConnector Version Arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- Environment
Variables Dictionary<string, string> Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- Execution
Role stringArn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- Function
Name string Physical function name.
Default - Automatically named by the AWS Native provider.
- Max
Concurrency doublePer Environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- Dictionary<string, string>
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- Timeout
Seconds double Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- Code
Web
Function Code Args - Application code to deploy.
- Runtime
Web
Function Runtime - Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- Egress
Network stringConnector Version Arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- Environment
Variables map[string]string Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- Execution
Role stringArn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- Function
Name string Physical function name.
Default - Automatically named by the AWS Native provider.
- Max
Concurrency float64Per Environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- map[string]string
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- Timeout
Seconds float64 Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- code object
- Application code to deploy.
- runtime "nodejs24.x" | "nodejs-latest"
- Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- egress_
network_ stringconnector_ version_ arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- environment_
variables map(string) Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- execution_
role_ stringarn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- function_
name string Physical function name.
Default - Automatically named by the AWS Native provider.
- max_
concurrency_ numberper_ environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- map(string)
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- timeout_
seconds number Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- code
Web
Function Code - Application code to deploy.
- runtime
Web
Function Runtime - Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- egress
Network StringConnector Version Arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- environment
Variables Map<String,String> Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- execution
Role StringArn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- function
Name String Physical function name.
Default - Automatically named by the AWS Native provider.
- max
Concurrency DoublePer Environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- Map<String,String>
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- timeout
Seconds Double Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- code
Web
Function Code - Application code to deploy.
- runtime
Web
Function Runtime - Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- egress
Network stringConnector Version Arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- environment
Variables {[key: string]: string} Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- execution
Role stringArn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- function
Name string Physical function name.
Default - Automatically named by the AWS Native provider.
- max
Concurrency numberPer Environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- {[key: string]: string}
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- timeout
Seconds number Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- code
Web
Function Code Args - Application code to deploy.
- runtime
Web
Function Runtime - Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- egress_
network_ strconnector_ version_ arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- environment_
variables Mapping[str, str] Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- execution_
role_ strarn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- function_
name str Physical function name.
Default - Automatically named by the AWS Native provider.
- max_
concurrency_ floatper_ environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- Mapping[str, str]
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- timeout_
seconds float Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
- code Property Map
- Application code to deploy.
- runtime "nodejs24.x" | "nodejs-latest"
- Runtime for the revision. Node.js loads index.js at the package root unless AWS_LAMBDA_NODEJS_ENTRYPOINT names another file. The application must listen on the host and port supplied in AWS_LAMBDA_HTTP_ENDPOINT.
- egress
Network StringConnector Version Arn Version-qualified ARN of an existing network connector for VPC egress. Revisions using a connector support only HomeRegion endpoints. Keep the connector available for as long as any retained revision uses it.
Default - No network connector.
- environment
Variables Map<String> Environment values included in each immutable revision. Pulumi secrets retain their Pulumi secret tracking, but AWS receives the resolved values. This is not runtime secret retrieval and does not prevent authorized AWS users from reading the configuration.
Default - No application environment variables.
- execution
Role StringArn Execution role assumed by the application. A supplied role must be in the function's account, trust lambda.amazonaws.com, and grant any AWS API access the application needs. AWSX adds scoped permissions for the central log group and its .local companions.
Default - AWSX creates a role with scoped CloudWatch Logs permissions. Add application permissions separately.
- function
Name String Physical function name.
Default - Automatically named by the AWS Native provider.
- max
Concurrency NumberPer Environment Maximum concurrent requests per execution environment. Must be an integer from 1 through 128.
Default - AWS default of 64.
- Map<String>
Tags applied to the function and AWSX-created supporting resources that accept tags.
Default - No additional tags.
- timeout
Seconds Number Maximum duration of an HTTP request, in seconds. Must be an integer from 3 through 900.
Default - AWS default of 30 seconds.
Outputs
All input properties are implicitly available as output properties. Additionally, the WebFunction resource produces the following output properties:
- Function
Arn string - ARN of the function.
- Log
Group Pulumi.Aws. Cloud Watch. Log Group - Central log group created in the home Region. This type is defined in the AWS Classic package.
- Revision
Arn string - ARN of the current revision.
- Revision
Id string - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- Function
Arn string - ARN of the function.
- Log
Group LogGroup - Central log group created in the home Region. This type is defined in the AWS Classic package.
- Revision
Arn string - ARN of the current revision.
- Revision
Id string - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- function_
arn string - ARN of the function.
- log_
group aws_cloudwatch_ log_ group_ log_ group - Central log group created in the home Region. This type is defined in the AWS Classic package.
- revision_
arn string - ARN of the current revision.
- revision_
id string - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- function
Arn String - ARN of the function.
- log
Group LogGroup - Central log group created in the home Region. This type is defined in the AWS Classic package.
- revision
Arn String - ARN of the current revision.
- revision
Id String - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- function
Arn string - ARN of the function.
- log
Group pulumiAws.cloudwatch. Log Group - Central log group created in the home Region. This type is defined in the AWS Classic package.
- revision
Arn string - ARN of the current revision.
- revision
Id string - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- function_
arn str - ARN of the function.
- log_
group pulumi_aws.cloudwatch. Log Group - Central log group created in the home Region. This type is defined in the AWS Classic package.
- revision_
arn str - ARN of the current revision.
- revision_
id str - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
- function
Arn String - ARN of the function.
- log
Group aws:cloudwatch:LogGroup - Central log group created in the home Region. This type is defined in the AWS Classic package.
- revision
Arn String - ARN of the current revision.
- revision
Id String - Identifier of the current revision. Pass it to an endpoint to route traffic explicitly.
Supporting Types
WebFunctionCode, WebFunctionCodeArgs
- Archive Archive
- Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- Archive
pulumi.
Archive - Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- archive archive
- Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- archive Archive
- Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- archive
pulumi.asset.
Archive - Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- archive
pulumi.
Archive - Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
- archive Archive
- Runnable application files, including dependencies. FileArchive accepts a directory or an existing archive.
WebFunctionRuntime
| Name | Value | Description |
|---|---|---|
| Node | nodejs24.x | Node.js 24.x. |
| NODEJS_LATEST | nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Name | Value | Description |
|---|---|---|
| Web | nodejs24.x | Node.js 24.x. |
| Web | nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Value | Description |
|---|---|
nodejs24.x | Node.js 24.x. |
nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Name | Value | Description |
|---|---|---|
| Node | nodejs24.x | Node.js 24.x. |
| NODEJS_LATEST | nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Name | Value | Description |
|---|---|---|
| Node | nodejs24.x | Node.js 24.x. |
| NODEJS_LATEST | nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Name | Value | Description |
|---|---|---|
| NODE_JS24_X | nodejs24.x | Node.js 24.x. |
| NODEJ_S_LATEST | nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
| Value | Description |
|---|---|
nodejs24.x | Node.js 24.x. |
nodejs-latest | The latest Node.js runtime selected by AWSX, currently Node.js 24.x. Upgrading AWSX can publish a new revision if this selection changes. Use a versioned runtime to pin it. |
Package Details
- Repository
- AWSx (Pulumi AWS Components) pulumi/pulumi-awsx
- License
- Apache-2.0
published on Friday, Nov 20, 2026 by Pulumi