This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Lambda::WebFunction
The AWS::Lambda::WebFunction resource creates a Lambda web function. A web function is a container for revisions and endpoints. This resource creates the web function only, with no revisions and no endpoints. The web function serves no traffic until you add revisions and endpoints. To add them, use the AWS::Lambda::WebFunctionRevision and AWS::Lambda::WebFunctionEndpoint resources. In this resource's template, you can set only FunctionName and Tags.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Lambda::WebFunction", "Properties" : { "FunctionName" :String, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::Lambda::WebFunction Properties: FunctionName:StringTags:- Tag
Properties
FunctionName-
The name of the web function. The name can contain letters, numbers, hyphens (-), and underscores (_), and can't begin or end with a hyphen or an underscore. The name is limited to 64 characters in length.
Required: Yes
Type: String
Minimum:
1Maximum:
256Update requires: Replacement
-
A list of tag key-value pairs to apply to the web function. If a tag key already exists, the new value overwrites the existing value.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the web function.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
CreatedAt-
The date and time the web function was created.
FunctionArn-
The Amazon Resource Name (ARN) of the web function.
State-
The current state of the web function.
StateReason-
The reason for the current state of the web function.
UpdatedAt-
The date and time the web function was last updated.
Examples
Web function
Create a web function named my-web-function.
JSON
"MyWebFunction": { "Type": "AWS::Lambda::WebFunction", "Properties": { "FunctionName": "my-web-function", "Tags": [ { "Key": "Environment", "Value": "Production" } ] } }
YAML
MyWebFunction: Type: AWS::Lambda::WebFunction Properties: FunctionName: my-web-function Tags: - Key: Environment Value: Production