1. Packages
  2. AWS
  3. API Docs
  4. lambda
  5. FunctionUrl
AWS v7.2.0 published on Thursday, Jul 31, 2025 by Pulumi

aws.lambda.FunctionUrl

Explore with Pulumi AI

aws logo
AWS v7.2.0 published on Thursday, Jul 31, 2025 by Pulumi

    Manages a Lambda function URL. Creates a dedicated HTTP(S) endpoint for a Lambda function to enable direct invocation via HTTP requests.

    Example Usage

    Basic Function URL with No Authentication

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.lambda.FunctionUrl("example", {
        functionName: exampleAwsLambdaFunction.functionName,
        authorizationType: "NONE",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.lambda_.FunctionUrl("example",
        function_name=example_aws_lambda_function["functionName"],
        authorization_type="NONE")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewFunctionUrl(ctx, "example", &lambda.FunctionUrlArgs{
    			FunctionName:      pulumi.Any(exampleAwsLambdaFunction.FunctionName),
    			AuthorizationType: pulumi.String("NONE"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Lambda.FunctionUrl("example", new()
        {
            FunctionName = exampleAwsLambdaFunction.FunctionName,
            AuthorizationType = "NONE",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.FunctionUrl;
    import com.pulumi.aws.lambda.FunctionUrlArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new FunctionUrl("example", FunctionUrlArgs.builder()
                .functionName(exampleAwsLambdaFunction.functionName())
                .authorizationType("NONE")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:lambda:FunctionUrl
        properties:
          functionName: ${exampleAwsLambdaFunction.functionName}
          authorizationType: NONE
    

    Function URL with IAM Authentication and CORS Configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.lambda.FunctionUrl("example", {
        functionName: exampleAwsLambdaFunction.functionName,
        qualifier: "my_alias",
        authorizationType: "AWS_IAM",
        invokeMode: "RESPONSE_STREAM",
        cors: {
            allowCredentials: true,
            allowOrigins: ["https://example.com"],
            allowMethods: [
                "GET",
                "POST",
            ],
            allowHeaders: [
                "date",
                "keep-alive",
            ],
            exposeHeaders: [
                "keep-alive",
                "date",
            ],
            maxAge: 86400,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.lambda_.FunctionUrl("example",
        function_name=example_aws_lambda_function["functionName"],
        qualifier="my_alias",
        authorization_type="AWS_IAM",
        invoke_mode="RESPONSE_STREAM",
        cors={
            "allow_credentials": True,
            "allow_origins": ["https://example.com"],
            "allow_methods": [
                "GET",
                "POST",
            ],
            "allow_headers": [
                "date",
                "keep-alive",
            ],
            "expose_headers": [
                "keep-alive",
                "date",
            ],
            "max_age": 86400,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewFunctionUrl(ctx, "example", &lambda.FunctionUrlArgs{
    			FunctionName:      pulumi.Any(exampleAwsLambdaFunction.FunctionName),
    			Qualifier:         pulumi.String("my_alias"),
    			AuthorizationType: pulumi.String("AWS_IAM"),
    			InvokeMode:        pulumi.String("RESPONSE_STREAM"),
    			Cors: &lambda.FunctionUrlCorsArgs{
    				AllowCredentials: pulumi.Bool(true),
    				AllowOrigins: pulumi.StringArray{
    					pulumi.String("https://example.com"),
    				},
    				AllowMethods: pulumi.StringArray{
    					pulumi.String("GET"),
    					pulumi.String("POST"),
    				},
    				AllowHeaders: pulumi.StringArray{
    					pulumi.String("date"),
    					pulumi.String("keep-alive"),
    				},
    				ExposeHeaders: pulumi.StringArray{
    					pulumi.String("keep-alive"),
    					pulumi.String("date"),
    				},
    				MaxAge: pulumi.Int(86400),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Lambda.FunctionUrl("example", new()
        {
            FunctionName = exampleAwsLambdaFunction.FunctionName,
            Qualifier = "my_alias",
            AuthorizationType = "AWS_IAM",
            InvokeMode = "RESPONSE_STREAM",
            Cors = new Aws.Lambda.Inputs.FunctionUrlCorsArgs
            {
                AllowCredentials = true,
                AllowOrigins = new[]
                {
                    "https://example.com",
                },
                AllowMethods = new[]
                {
                    "GET",
                    "POST",
                },
                AllowHeaders = new[]
                {
                    "date",
                    "keep-alive",
                },
                ExposeHeaders = new[]
                {
                    "keep-alive",
                    "date",
                },
                MaxAge = 86400,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.FunctionUrl;
    import com.pulumi.aws.lambda.FunctionUrlArgs;
    import com.pulumi.aws.lambda.inputs.FunctionUrlCorsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new FunctionUrl("example", FunctionUrlArgs.builder()
                .functionName(exampleAwsLambdaFunction.functionName())
                .qualifier("my_alias")
                .authorizationType("AWS_IAM")
                .invokeMode("RESPONSE_STREAM")
                .cors(FunctionUrlCorsArgs.builder()
                    .allowCredentials(true)
                    .allowOrigins("https://example.com")
                    .allowMethods(                
                        "GET",
                        "POST")
                    .allowHeaders(                
                        "date",
                        "keep-alive")
                    .exposeHeaders(                
                        "keep-alive",
                        "date")
                    .maxAge(86400)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:lambda:FunctionUrl
        properties:
          functionName: ${exampleAwsLambdaFunction.functionName}
          qualifier: my_alias
          authorizationType: AWS_IAM
          invokeMode: RESPONSE_STREAM
          cors:
            allowCredentials: true
            allowOrigins:
              - https://example.com
            allowMethods:
              - GET
              - POST
            allowHeaders:
              - date
              - keep-alive
            exposeHeaders:
              - keep-alive
              - date
            maxAge: 86400
    

    Create FunctionUrl Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FunctionUrl(name: string, args: FunctionUrlArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionUrl(resource_name: str,
                    args: FunctionUrlArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def FunctionUrl(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    authorization_type: Optional[str] = None,
                    function_name: Optional[str] = None,
                    cors: Optional[FunctionUrlCorsArgs] = None,
                    invoke_mode: Optional[str] = None,
                    qualifier: Optional[str] = None,
                    region: Optional[str] = None)
    func NewFunctionUrl(ctx *Context, name string, args FunctionUrlArgs, opts ...ResourceOption) (*FunctionUrl, error)
    public FunctionUrl(string name, FunctionUrlArgs args, CustomResourceOptions? opts = null)
    public FunctionUrl(String name, FunctionUrlArgs args)
    public FunctionUrl(String name, FunctionUrlArgs args, CustomResourceOptions options)
    
    type: aws:lambda:FunctionUrl
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FunctionUrlArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FunctionUrlArgs
    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 FunctionUrlArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionUrlArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionUrlArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var functionUrlResource = new Aws.Lambda.FunctionUrl("functionUrlResource", new()
    {
        AuthorizationType = "string",
        FunctionName = "string",
        Cors = new Aws.Lambda.Inputs.FunctionUrlCorsArgs
        {
            AllowCredentials = false,
            AllowHeaders = new[]
            {
                "string",
            },
            AllowMethods = new[]
            {
                "string",
            },
            AllowOrigins = new[]
            {
                "string",
            },
            ExposeHeaders = new[]
            {
                "string",
            },
            MaxAge = 0,
        },
        InvokeMode = "string",
        Qualifier = "string",
        Region = "string",
    });
    
    example, err := lambda.NewFunctionUrl(ctx, "functionUrlResource", &lambda.FunctionUrlArgs{
    	AuthorizationType: pulumi.String("string"),
    	FunctionName:      pulumi.String("string"),
    	Cors: &lambda.FunctionUrlCorsArgs{
    		AllowCredentials: pulumi.Bool(false),
    		AllowHeaders: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		AllowMethods: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		AllowOrigins: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ExposeHeaders: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		MaxAge: pulumi.Int(0),
    	},
    	InvokeMode: pulumi.String("string"),
    	Qualifier:  pulumi.String("string"),
    	Region:     pulumi.String("string"),
    })
    
    var functionUrlResource = new FunctionUrl("functionUrlResource", FunctionUrlArgs.builder()
        .authorizationType("string")
        .functionName("string")
        .cors(FunctionUrlCorsArgs.builder()
            .allowCredentials(false)
            .allowHeaders("string")
            .allowMethods("string")
            .allowOrigins("string")
            .exposeHeaders("string")
            .maxAge(0)
            .build())
        .invokeMode("string")
        .qualifier("string")
        .region("string")
        .build());
    
    function_url_resource = aws.lambda_.FunctionUrl("functionUrlResource",
        authorization_type="string",
        function_name="string",
        cors={
            "allow_credentials": False,
            "allow_headers": ["string"],
            "allow_methods": ["string"],
            "allow_origins": ["string"],
            "expose_headers": ["string"],
            "max_age": 0,
        },
        invoke_mode="string",
        qualifier="string",
        region="string")
    
    const functionUrlResource = new aws.lambda.FunctionUrl("functionUrlResource", {
        authorizationType: "string",
        functionName: "string",
        cors: {
            allowCredentials: false,
            allowHeaders: ["string"],
            allowMethods: ["string"],
            allowOrigins: ["string"],
            exposeHeaders: ["string"],
            maxAge: 0,
        },
        invokeMode: "string",
        qualifier: "string",
        region: "string",
    });
    
    type: aws:lambda:FunctionUrl
    properties:
        authorizationType: string
        cors:
            allowCredentials: false
            allowHeaders:
                - string
            allowMethods:
                - string
            allowOrigins:
                - string
            exposeHeaders:
                - string
            maxAge: 0
        functionName: string
        invokeMode: string
        qualifier: string
        region: string
    

    FunctionUrl 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 FunctionUrl resource accepts the following input properties:

    AuthorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    FunctionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    Cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    InvokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    Qualifier string
    Alias name or $LATEST.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    AuthorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    FunctionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    Cors FunctionUrlCorsArgs
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    InvokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    Qualifier string
    Alias name or $LATEST.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    authorizationType String
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    functionName String

    Name or ARN of the Lambda function.

    The following arguments are optional:

    cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    invokeMode String
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier String
    Alias name or $LATEST.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    authorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    functionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    invokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier string
    Alias name or $LATEST.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    authorization_type str
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    function_name str

    Name or ARN of the Lambda function.

    The following arguments are optional:

    cors FunctionUrlCorsArgs
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    invoke_mode str
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier str
    Alias name or $LATEST.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    authorizationType String
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    functionName String

    Name or ARN of the Lambda function.

    The following arguments are optional:

    cors Property Map
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    invokeMode String
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier String
    Alias name or $LATEST.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FunctionUrl resource produces the following output properties:

    FunctionArn string
    ARN of the Lambda function.
    FunctionUrlResult string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    Id string
    The provider-assigned unique ID for this managed resource.
    UrlId string
    Generated ID for the endpoint.
    FunctionArn string
    ARN of the Lambda function.
    FunctionUrl string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    Id string
    The provider-assigned unique ID for this managed resource.
    UrlId string
    Generated ID for the endpoint.
    functionArn String
    ARN of the Lambda function.
    functionUrl String
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    id String
    The provider-assigned unique ID for this managed resource.
    urlId String
    Generated ID for the endpoint.
    functionArn string
    ARN of the Lambda function.
    functionUrl string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    id string
    The provider-assigned unique ID for this managed resource.
    urlId string
    Generated ID for the endpoint.
    function_arn str
    ARN of the Lambda function.
    function_url str
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    id str
    The provider-assigned unique ID for this managed resource.
    url_id str
    Generated ID for the endpoint.
    functionArn String
    ARN of the Lambda function.
    functionUrl String
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    id String
    The provider-assigned unique ID for this managed resource.
    urlId String
    Generated ID for the endpoint.

    Look up Existing FunctionUrl Resource

    Get an existing FunctionUrl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FunctionUrlState, opts?: CustomResourceOptions): FunctionUrl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authorization_type: Optional[str] = None,
            cors: Optional[FunctionUrlCorsArgs] = None,
            function_arn: Optional[str] = None,
            function_name: Optional[str] = None,
            function_url: Optional[str] = None,
            invoke_mode: Optional[str] = None,
            qualifier: Optional[str] = None,
            region: Optional[str] = None,
            url_id: Optional[str] = None) -> FunctionUrl
    func GetFunctionUrl(ctx *Context, name string, id IDInput, state *FunctionUrlState, opts ...ResourceOption) (*FunctionUrl, error)
    public static FunctionUrl Get(string name, Input<string> id, FunctionUrlState? state, CustomResourceOptions? opts = null)
    public static FunctionUrl get(String name, Output<String> id, FunctionUrlState state, CustomResourceOptions options)
    resources:  _:    type: aws:lambda:FunctionUrl    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AuthorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    Cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    FunctionArn string
    ARN of the Lambda function.
    FunctionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    FunctionUrlResult string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    InvokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    Qualifier string
    Alias name or $LATEST.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    UrlId string
    Generated ID for the endpoint.
    AuthorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    Cors FunctionUrlCorsArgs
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    FunctionArn string
    ARN of the Lambda function.
    FunctionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    FunctionUrl string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    InvokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    Qualifier string
    Alias name or $LATEST.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    UrlId string
    Generated ID for the endpoint.
    authorizationType String
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    functionArn String
    ARN of the Lambda function.
    functionName String

    Name or ARN of the Lambda function.

    The following arguments are optional:

    functionUrl String
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode String
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier String
    Alias name or $LATEST.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    urlId String
    Generated ID for the endpoint.
    authorizationType string
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    cors FunctionUrlCors
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    functionArn string
    ARN of the Lambda function.
    functionName string

    Name or ARN of the Lambda function.

    The following arguments are optional:

    functionUrl string
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode string
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier string
    Alias name or $LATEST.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    urlId string
    Generated ID for the endpoint.
    authorization_type str
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    cors FunctionUrlCorsArgs
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    function_arn str
    ARN of the Lambda function.
    function_name str

    Name or ARN of the Lambda function.

    The following arguments are optional:

    function_url str
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invoke_mode str
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier str
    Alias name or $LATEST.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    url_id str
    Generated ID for the endpoint.
    authorizationType String
    Type of authentication that the function URL uses. Valid values are AWS_IAM and NONE.
    cors Property Map
    Cross-origin resource sharing (CORS) settings for the function URL. See below.
    functionArn String
    ARN of the Lambda function.
    functionName String

    Name or ARN of the Lambda function.

    The following arguments are optional:

    functionUrl String
    HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode String
    How the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM.
    qualifier String
    Alias name or $LATEST.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    urlId String
    Generated ID for the endpoint.

    Supporting Types

    FunctionUrlCors, FunctionUrlCorsArgs

    AllowCredentials bool
    Whether to allow cookies or other credentials in requests to the function URL.
    AllowHeaders List<string>
    HTTP headers that origins can include in requests to the function URL.
    AllowMethods List<string>
    HTTP methods that are allowed when calling the function URL.
    AllowOrigins List<string>
    Origins that can access the function URL.
    ExposeHeaders List<string>
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    MaxAge int
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.
    AllowCredentials bool
    Whether to allow cookies or other credentials in requests to the function URL.
    AllowHeaders []string
    HTTP headers that origins can include in requests to the function URL.
    AllowMethods []string
    HTTP methods that are allowed when calling the function URL.
    AllowOrigins []string
    Origins that can access the function URL.
    ExposeHeaders []string
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    MaxAge int
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.
    allowCredentials Boolean
    Whether to allow cookies or other credentials in requests to the function URL.
    allowHeaders List<String>
    HTTP headers that origins can include in requests to the function URL.
    allowMethods List<String>
    HTTP methods that are allowed when calling the function URL.
    allowOrigins List<String>
    Origins that can access the function URL.
    exposeHeaders List<String>
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge Integer
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.
    allowCredentials boolean
    Whether to allow cookies or other credentials in requests to the function URL.
    allowHeaders string[]
    HTTP headers that origins can include in requests to the function URL.
    allowMethods string[]
    HTTP methods that are allowed when calling the function URL.
    allowOrigins string[]
    Origins that can access the function URL.
    exposeHeaders string[]
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge number
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.
    allow_credentials bool
    Whether to allow cookies or other credentials in requests to the function URL.
    allow_headers Sequence[str]
    HTTP headers that origins can include in requests to the function URL.
    allow_methods Sequence[str]
    HTTP methods that are allowed when calling the function URL.
    allow_origins Sequence[str]
    Origins that can access the function URL.
    expose_headers Sequence[str]
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    max_age int
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.
    allowCredentials Boolean
    Whether to allow cookies or other credentials in requests to the function URL.
    allowHeaders List<String>
    HTTP headers that origins can include in requests to the function URL.
    allowMethods List<String>
    HTTP methods that are allowed when calling the function URL.
    allowOrigins List<String>
    Origins that can access the function URL.
    exposeHeaders List<String>
    HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge Number
    Maximum amount of time, in seconds, that web browsers can cache results of a preflight request. Maximum value is 86400.

    Import

    Using pulumi import, import Lambda function URLs using the function_name or function_name/qualifier. For example:

    $ pulumi import aws:lambda/functionUrl:FunctionUrl example example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.2.0 published on Thursday, Jul 31, 2025 by Pulumi