AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi
aws.lambda.getFunctionUrl
Explore with Pulumi AI
Provides information about a Lambda function URL.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const functionName = config.require("functionName");
const existing = aws.lambda.getFunctionUrl({
    functionName: functionName,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
function_name = config.require("functionName")
existing = aws.lambda.get_function_url(function_name=function_name)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		functionName := cfg.Require("functionName")
		_, err := lambda.LookupFunctionUrl(ctx, &lambda.LookupFunctionUrlArgs{
			FunctionName: functionName,
		}, nil)
		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 config = new Config();
    var functionName = config.Require("functionName");
    var existing = Aws.Lambda.GetFunctionUrl.Invoke(new()
    {
        FunctionName = functionName,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.LambdaFunctions;
import com.pulumi.aws.lambda.inputs.GetFunctionUrlArgs;
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) {
        final var config = ctx.config();
        final var functionName = config.get("functionName");
        final var existing = LambdaFunctions.getFunctionUrl(GetFunctionUrlArgs.builder()
            .functionName(functionName)
            .build());
    }
}
configuration:
  functionName:
    type: string
variables:
  existing:
    fn::invoke:
      function: aws:lambda:getFunctionUrl
      arguments:
        functionName: ${functionName}
Using getFunctionUrl
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFunctionUrl(args: GetFunctionUrlArgs, opts?: InvokeOptions): Promise<GetFunctionUrlResult>
function getFunctionUrlOutput(args: GetFunctionUrlOutputArgs, opts?: InvokeOptions): Output<GetFunctionUrlResult>def get_function_url(function_name: Optional[str] = None,
                     qualifier: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFunctionUrlResult
def get_function_url_output(function_name: Optional[pulumi.Input[str]] = None,
                     qualifier: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFunctionUrlResult]func LookupFunctionUrl(ctx *Context, args *LookupFunctionUrlArgs, opts ...InvokeOption) (*LookupFunctionUrlResult, error)
func LookupFunctionUrlOutput(ctx *Context, args *LookupFunctionUrlOutputArgs, opts ...InvokeOption) LookupFunctionUrlResultOutput> Note: This function is named LookupFunctionUrl in the Go SDK.
public static class GetFunctionUrl 
{
    public static Task<GetFunctionUrlResult> InvokeAsync(GetFunctionUrlArgs args, InvokeOptions? opts = null)
    public static Output<GetFunctionUrlResult> Invoke(GetFunctionUrlInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFunctionUrlResult> getFunctionUrl(GetFunctionUrlArgs args, InvokeOptions options)
public static Output<GetFunctionUrlResult> getFunctionUrl(GetFunctionUrlArgs args, InvokeOptions options)
fn::invoke:
  function: aws:lambda/getFunctionUrl:getFunctionUrl
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FunctionName string
- The name (or ARN) of the Lambda function.
- Qualifier string
- Alias name or "$LATEST".
- FunctionName string
- The name (or ARN) of the Lambda function.
- Qualifier string
- Alias name or "$LATEST".
- functionName String
- The name (or ARN) of the Lambda function.
- qualifier String
- Alias name or "$LATEST".
- functionName string
- The name (or ARN) of the Lambda function.
- qualifier string
- Alias name or "$LATEST".
- function_name str
- The name (or ARN) of the Lambda function.
- qualifier str
- Alias name or "$LATEST".
- functionName String
- The name (or ARN) of the Lambda function.
- qualifier String
- Alias name or "$LATEST".
getFunctionUrl Result
The following output properties are available:
- string
- Type of authentication that the function URL uses.
- Cors
List<GetFunction Url Cor> 
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- CreationTime string
- When the function URL was created, in ISO-8601 format.
- FunctionArn string
- ARN of the function.
- FunctionName string
- 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.
- InvokeMode string
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- LastModified stringTime 
- When the function URL configuration was last updated, in ISO-8601 format.
- UrlId string
- Generated ID for the endpoint.
- Qualifier string
- string
- Type of authentication that the function URL uses.
- Cors
[]GetFunction Url Cor 
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- CreationTime string
- When the function URL was created, in ISO-8601 format.
- FunctionArn string
- ARN of the function.
- FunctionName string
- 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.
- InvokeMode string
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- LastModified stringTime 
- When the function URL configuration was last updated, in ISO-8601 format.
- UrlId string
- Generated ID for the endpoint.
- Qualifier string
- String
- Type of authentication that the function URL uses.
- cors
List<GetFunction Url Cor> 
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- creationTime String
- When the function URL was created, in ISO-8601 format.
- functionArn String
- ARN of the function.
- functionName String
- 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.
- invokeMode String
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- lastModified StringTime 
- When the function URL configuration was last updated, in ISO-8601 format.
- urlId String
- Generated ID for the endpoint.
- qualifier String
- string
- Type of authentication that the function URL uses.
- cors
GetFunction Url Cor[] 
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- creationTime string
- When the function URL was created, in ISO-8601 format.
- functionArn string
- ARN of the function.
- functionName string
- 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.
- invokeMode string
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- lastModified stringTime 
- When the function URL configuration was last updated, in ISO-8601 format.
- urlId string
- Generated ID for the endpoint.
- qualifier string
- str
- Type of authentication that the function URL uses.
- cors
Sequence[lambda_.Get Function Url Cor] 
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- creation_time str
- When the function URL was created, in ISO-8601 format.
- function_arn str
- ARN of the function.
- function_name str
- 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.
- invoke_mode str
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- last_modified_ strtime 
- When the function URL configuration was last updated, in ISO-8601 format.
- url_id str
- Generated ID for the endpoint.
- qualifier str
- String
- Type of authentication that the function URL uses.
- cors List<Property Map>
- The cross-origin resource sharing (CORS) settings for the function URL. See the aws.lambda.FunctionUrlresource documentation for more details.
- creationTime String
- When the function URL was created, in ISO-8601 format.
- functionArn String
- ARN of the function.
- functionName String
- 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.
- invokeMode String
- Whether the Lambda function responds in BUFFEREDorRESPONSE_STREAMmode.
- lastModified StringTime 
- When the function URL configuration was last updated, in ISO-8601 format.
- urlId String
- Generated ID for the endpoint.
- qualifier String
Supporting Types
GetFunctionUrlCor   
- AllowCredentials bool
- AllowHeaders List<string>
- AllowMethods List<string>
- AllowOrigins List<string>
- ExposeHeaders List<string>
- MaxAge int
- AllowCredentials bool
- AllowHeaders []string
- AllowMethods []string
- AllowOrigins []string
- ExposeHeaders []string
- MaxAge int
- allowCredentials Boolean
- allowHeaders List<String>
- allowMethods List<String>
- allowOrigins List<String>
- exposeHeaders List<String>
- maxAge Integer
- allowCredentials boolean
- allowHeaders string[]
- allowMethods string[]
- allowOrigins string[]
- exposeHeaders string[]
- maxAge number
- allow_credentials bool
- allow_headers Sequence[str]
- allow_methods Sequence[str]
- allow_origins Sequence[str]
- expose_headers Sequence[str]
- max_age int
- allowCredentials Boolean
- allowHeaders List<String>
- allowMethods List<String>
- allowOrigins List<String>
- exposeHeaders List<String>
- maxAge Number
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.