1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. FunctionUrl

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.lambda.FunctionUrl

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    Provides a Lambda function URL resource. A function URL is a dedicated HTTP(S) endpoint for a Lambda function.

    See the AWS Lambda documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const testLatest = new aws.lambda.FunctionUrl("test_latest", {
        functionName: test.functionName,
        authorizationType: "NONE",
    });
    const testLive = new aws.lambda.FunctionUrl("test_live", {
        functionName: test.functionName,
        qualifier: "my_alias",
        authorizationType: "AWS_IAM",
        cors: {
            allowCredentials: true,
            allowOrigins: ["*"],
            allowMethods: ["*"],
            allowHeaders: [
                "date",
                "keep-alive",
            ],
            exposeHeaders: [
                "keep-alive",
                "date",
            ],
            maxAge: 86400,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test_latest = aws.lambda_.FunctionUrl("test_latest",
        function_name=test["functionName"],
        authorization_type="NONE")
    test_live = aws.lambda_.FunctionUrl("test_live",
        function_name=test["functionName"],
        qualifier="my_alias",
        authorization_type="AWS_IAM",
        cors=aws.lambda_.FunctionUrlCorsArgs(
            allow_credentials=True,
            allow_origins=["*"],
            allow_methods=["*"],
            allow_headers=[
                "date",
                "keep-alive",
            ],
            expose_headers=[
                "keep-alive",
                "date",
            ],
            max_age=86400,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewFunctionUrl(ctx, "test_latest", &lambda.FunctionUrlArgs{
    			FunctionName:      pulumi.Any(test.FunctionName),
    			AuthorizationType: pulumi.String("NONE"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lambda.NewFunctionUrl(ctx, "test_live", &lambda.FunctionUrlArgs{
    			FunctionName:      pulumi.Any(test.FunctionName),
    			Qualifier:         pulumi.String("my_alias"),
    			AuthorizationType: pulumi.String("AWS_IAM"),
    			Cors: &lambda.FunctionUrlCorsArgs{
    				AllowCredentials: pulumi.Bool(true),
    				AllowOrigins: pulumi.StringArray{
    					pulumi.String("*"),
    				},
    				AllowMethods: pulumi.StringArray{
    					pulumi.String("*"),
    				},
    				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 testLatest = new Aws.Lambda.FunctionUrl("test_latest", new()
        {
            FunctionName = test.FunctionName,
            AuthorizationType = "NONE",
        });
    
        var testLive = new Aws.Lambda.FunctionUrl("test_live", new()
        {
            FunctionName = test.FunctionName,
            Qualifier = "my_alias",
            AuthorizationType = "AWS_IAM",
            Cors = new Aws.Lambda.Inputs.FunctionUrlCorsArgs
            {
                AllowCredentials = true,
                AllowOrigins = new[]
                {
                    "*",
                },
                AllowMethods = new[]
                {
                    "*",
                },
                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 testLatest = new FunctionUrl("testLatest", FunctionUrlArgs.builder()        
                .functionName(test.functionName())
                .authorizationType("NONE")
                .build());
    
            var testLive = new FunctionUrl("testLive", FunctionUrlArgs.builder()        
                .functionName(test.functionName())
                .qualifier("my_alias")
                .authorizationType("AWS_IAM")
                .cors(FunctionUrlCorsArgs.builder()
                    .allowCredentials(true)
                    .allowOrigins("*")
                    .allowMethods("*")
                    .allowHeaders(                
                        "date",
                        "keep-alive")
                    .exposeHeaders(                
                        "keep-alive",
                        "date")
                    .maxAge(86400)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testLatest:
        type: aws:lambda:FunctionUrl
        name: test_latest
        properties:
          functionName: ${test.functionName}
          authorizationType: NONE
      testLive:
        type: aws:lambda:FunctionUrl
        name: test_live
        properties:
          functionName: ${test.functionName}
          qualifier: my_alias
          authorizationType: AWS_IAM
          cors:
            allowCredentials: true
            allowOrigins:
              - '*'
            allowMethods:
              - '*'
            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[_lambda_.FunctionUrlCorsArgs] = None,
                    invoke_mode: Optional[str] = None,
                    qualifier: 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.

    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",
    });
    
    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"),
    })
    
    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")
        .build());
    
    function_url_resource = aws.lambda_.FunctionUrl("functionUrlResource",
        authorization_type="string",
        function_name="string",
        cors=aws.lambda_.FunctionUrlCorsArgs(
            allow_credentials=False,
            allow_headers=["string"],
            allow_methods=["string"],
            allow_origins=["string"],
            expose_headers=["string"],
            max_age=0,
        ),
        invoke_mode="string",
        qualifier="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",
    });
    
    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
    

    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

    The FunctionUrl resource accepts the following input properties:

    AuthorizationType string
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    FunctionName string
    The name (or ARN) of the Lambda function.
    Cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    InvokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    Qualifier string
    The alias name or "$LATEST".
    AuthorizationType string
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    FunctionName string
    The name (or ARN) of the Lambda function.
    Cors FunctionUrlCorsArgs
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    InvokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    Qualifier string
    The alias name or "$LATEST".
    authorizationType String
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    functionName String
    The name (or ARN) of the Lambda function.
    cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    invokeMode String
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier String
    The alias name or "$LATEST".
    authorizationType string
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    functionName string
    The name (or ARN) of the Lambda function.
    cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    invokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier string
    The alias name or "$LATEST".
    authorization_type str
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    function_name str
    The name (or ARN) of the Lambda function.
    cors lambda_.FunctionUrlCorsArgs
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    invoke_mode str
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier str
    The alias name or "$LATEST".
    authorizationType String
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    functionName String
    The name (or ARN) of the Lambda function.
    cors Property Map
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    invokeMode String
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier String
    The alias name or "$LATEST".

    Outputs

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

    FunctionArn string
    The Amazon Resource Name (ARN) of the function.
    FunctionUrlResult string
    The 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
    A generated ID for the endpoint.
    FunctionArn string
    The Amazon Resource Name (ARN) of the function.
    FunctionUrl string
    The 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
    A generated ID for the endpoint.
    functionArn String
    The Amazon Resource Name (ARN) of the function.
    functionUrl String
    The 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
    A generated ID for the endpoint.
    functionArn string
    The Amazon Resource Name (ARN) of the function.
    functionUrl string
    The 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
    A generated ID for the endpoint.
    function_arn str
    The Amazon Resource Name (ARN) of the function.
    function_url str
    The 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
    A generated ID for the endpoint.
    functionArn String
    The Amazon Resource Name (ARN) of the function.
    functionUrl String
    The 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
    A 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[_lambda_.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,
            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)
    Resource lookup is not supported in YAML
    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
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    Cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    FunctionArn string
    The Amazon Resource Name (ARN) of the function.
    FunctionName string
    The name (or ARN) of the Lambda function.
    FunctionUrlResult string
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    InvokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    Qualifier string
    The alias name or "$LATEST".
    UrlId string
    A generated ID for the endpoint.
    AuthorizationType string
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    Cors FunctionUrlCorsArgs
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    FunctionArn string
    The Amazon Resource Name (ARN) of the function.
    FunctionName string
    The name (or ARN) of the Lambda function.
    FunctionUrl string
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    InvokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    Qualifier string
    The alias name or "$LATEST".
    UrlId string
    A generated ID for the endpoint.
    authorizationType String
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    functionArn String
    The Amazon Resource Name (ARN) of the function.
    functionName String
    The name (or ARN) of the Lambda function.
    functionUrl String
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode String
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier String
    The alias name or "$LATEST".
    urlId String
    A generated ID for the endpoint.
    authorizationType string
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    cors FunctionUrlCors
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    functionArn string
    The Amazon Resource Name (ARN) of the function.
    functionName string
    The name (or ARN) of the Lambda function.
    functionUrl string
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode string
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier string
    The alias name or "$LATEST".
    urlId string
    A generated ID for the endpoint.
    authorization_type str
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    cors lambda_.FunctionUrlCorsArgs
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    function_arn str
    The Amazon Resource Name (ARN) of the function.
    function_name str
    The name (or ARN) of the Lambda function.
    function_url str
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invoke_mode str
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier str
    The alias name or "$LATEST".
    url_id str
    A generated ID for the endpoint.
    authorizationType String
    The type of authentication that the function URL uses. Set to "AWS_IAM" to restrict access to authenticated IAM users only. Set to "NONE" to bypass IAM authentication and create a public endpoint. See the AWS documentation for more details.
    cors Property Map
    The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
    functionArn String
    The Amazon Resource Name (ARN) of the function.
    functionName String
    The name (or ARN) of the Lambda function.
    functionUrl String
    The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws/.
    invokeMode String
    Determines how the Lambda function responds to an invocation. Valid values are BUFFERED (default) and RESPONSE_STREAM. See more in Configuring a Lambda function to stream responses.
    qualifier String
    The alias name or "$LATEST".
    urlId String
    A generated ID for the endpoint.

    Supporting Types

    FunctionUrlCors, FunctionUrlCorsArgs

    AllowCredentials bool
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    AllowHeaders List<string>
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    AllowMethods List<string>
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    AllowOrigins List<string>
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    ExposeHeaders List<string>
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    MaxAge int
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The maximum value is 86400.
    AllowCredentials bool
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    AllowHeaders []string
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    AllowMethods []string
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    AllowOrigins []string
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    ExposeHeaders []string
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    MaxAge int
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The maximum value is 86400.
    allowCredentials Boolean
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    allowHeaders List<String>
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    allowMethods List<String>
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    allowOrigins List<String>
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    exposeHeaders List<String>
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge Integer
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The maximum value is 86400.
    allowCredentials boolean
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    allowHeaders string[]
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    allowMethods string[]
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    allowOrigins string[]
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    exposeHeaders string[]
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge number
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The maximum value is 86400.
    allow_credentials bool
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    allow_headers Sequence[str]
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    allow_methods Sequence[str]
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    allow_origins Sequence[str]
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    expose_headers Sequence[str]
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    max_age int
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The maximum value is 86400.
    allowCredentials Boolean
    Whether to allow cookies or other credentials in requests to the function URL. The default is false.
    allowHeaders List<String>
    The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].
    allowMethods List<String>
    The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).
    allowOrigins List<String>
    The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www.example.com", "http://localhost:60905"].
    exposeHeaders List<String>
    The HTTP headers in your function response that you want to expose to origins that call the function URL.
    maxAge Number
    The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to 0, which means that the browser doesn't cache results. The 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 test_lambda_url my_test_lambda_function
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi