aws.lambda.FunctionUrl
Explore with Pulumi AI
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={
"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.
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",
});
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={
"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
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:
- 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. - Function
Name string - The name (or ARN) of the Lambda function.
- Cors
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- Invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - Qualifier string
- The alias name or
"$LATEST"
.
- 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. - Function
Name string - The name (or ARN) of the Lambda function.
- Cors
Function
Url Cors Args - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- Invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - Qualifier string
- The alias name or
"$LATEST"
.
- 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. - function
Name String - The name (or ARN) of the Lambda function.
- cors
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- invoke
Mode String - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier String
- The alias name or
"$LATEST"
.
- 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. - function
Name string - The name (or ARN) of the Lambda function.
- cors
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier string
- The alias name or
"$LATEST"
.
- 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_.
Function Url Cors Args - 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) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier str
- The alias name or
"$LATEST"
.
- 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. - function
Name 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.
- invoke
Mode String - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_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:
- Function
Arn string - The Amazon Resource Name (ARN) of the function.
- Function
Url stringResult - 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.
- Url
Id string - A generated ID for the endpoint.
- Function
Arn string - The Amazon Resource Name (ARN) of the function.
- Function
Url 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.
- Url
Id string - A generated ID for the endpoint.
- function
Arn String - The Amazon Resource Name (ARN) of the function.
- function
Url 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.
- url
Id String - A generated ID for the endpoint.
- function
Arn string - The Amazon Resource Name (ARN) of the function.
- function
Url 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.
- url
Id 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.
- function
Arn String - The Amazon Resource Name (ARN) of the function.
- function
Url 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.
- url
Id 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.
- 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
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- Function
Arn string - The Amazon Resource Name (ARN) of the function.
- Function
Name string - The name (or ARN) of the Lambda function.
- Function
Url stringResult - The HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - Invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - Qualifier string
- The alias name or
"$LATEST"
. - Url
Id string - A generated ID for the endpoint.
- 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
Function
Url Cors Args - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- Function
Arn string - The Amazon Resource Name (ARN) of the function.
- Function
Name string - The name (or ARN) of the Lambda function.
- Function
Url string - The HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - Invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - Qualifier string
- The alias name or
"$LATEST"
. - Url
Id string - A generated ID for the endpoint.
- 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
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- function
Arn String - The Amazon Resource Name (ARN) of the function.
- function
Name String - The name (or ARN) of the Lambda function.
- function
Url String - The HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - invoke
Mode String - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier String
- The alias name or
"$LATEST"
. - url
Id String - A generated ID for the endpoint.
- 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
Function
Url Cors - The cross-origin resource sharing (CORS) settings for the function URL. Documented below.
- function
Arn string - The Amazon Resource Name (ARN) of the function.
- function
Name string - The name (or ARN) of the Lambda function.
- function
Url string - The HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - invoke
Mode string - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier string
- The alias name or
"$LATEST"
. - url
Id string - A generated ID for the endpoint.
- 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_.
Function Url Cors Args - 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) andRESPONSE_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.
- 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.
- function
Arn String - The Amazon Resource Name (ARN) of the function.
- function
Name String - The name (or ARN) of the Lambda function.
- function
Url String - The HTTP URL endpoint for the function in the format
https://<url_id>.lambda-url.<region>.on.aws/
. - invoke
Mode String - Determines how the Lambda function responds to an invocation. Valid values are
BUFFERED
(default) andRESPONSE_STREAM
. See more in Configuring a Lambda function to stream responses. - qualifier String
- The alias name or
"$LATEST"
. - url
Id String - A generated ID for the endpoint.
Supporting Types
FunctionUrlCors, FunctionUrlCorsArgs
- Allow
Credentials bool - Whether to allow cookies or other credentials in requests to the function URL. The default is
false
. - Allow
Headers List<string> - The HTTP headers that origins can include in requests to the function URL. For example:
["date", "keep-alive", "x-custom-header"]
. - Allow
Methods List<string> - The HTTP methods that are allowed when calling the function URL. For example:
["GET", "POST", "DELETE"]
, or the wildcard character (["*"]
). - Allow
Origins 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"]
. - Expose
Headers List<string> - 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 is86400
.
- Allow
Credentials bool - Whether to allow cookies or other credentials in requests to the function URL. The default is
false
. - Allow
Headers []string - The HTTP headers that origins can include in requests to the function URL. For example:
["date", "keep-alive", "x-custom-header"]
. - Allow
Methods []string - The HTTP methods that are allowed when calling the function URL. For example:
["GET", "POST", "DELETE"]
, or the wildcard character (["*"]
). - Allow
Origins []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"]
. - Expose
Headers []string - 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 is86400
.
- allow
Credentials Boolean - Whether to allow cookies or other credentials in requests to the function URL. The default is
false
. - allow
Headers List<String> - The HTTP headers that origins can include in requests to the function URL. For example:
["date", "keep-alive", "x-custom-header"]
. - allow
Methods List<String> - The HTTP methods that are allowed when calling the function URL. For example:
["GET", "POST", "DELETE"]
, or the wildcard character (["*"]
). - allow
Origins 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"]
. - expose
Headers List<String> - The HTTP headers in your function response that you want to expose to origins that call the function URL.
- max
Age 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 is86400
.
- allow
Credentials boolean - Whether to allow cookies or other credentials in requests to the function URL. The default is
false
. - allow
Headers string[] - The HTTP headers that origins can include in requests to the function URL. For example:
["date", "keep-alive", "x-custom-header"]
. - allow
Methods string[] - The HTTP methods that are allowed when calling the function URL. For example:
["GET", "POST", "DELETE"]
, or the wildcard character (["*"]
). - allow
Origins 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"]
. - expose
Headers string[] - The HTTP headers in your function response that you want to expose to origins that call the function URL.
- max
Age 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 is86400
.
- 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 is86400
.
- allow
Credentials Boolean - Whether to allow cookies or other credentials in requests to the function URL. The default is
false
. - allow
Headers List<String> - The HTTP headers that origins can include in requests to the function URL. For example:
["date", "keep-alive", "x-custom-header"]
. - allow
Methods List<String> - The HTTP methods that are allowed when calling the function URL. For example:
["GET", "POST", "DELETE"]
, or the wildcard character (["*"]
). - allow
Origins 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"]
. - expose
Headers List<String> - The HTTP headers in your function response that you want to expose to origins that call the function URL.
- max
Age 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 is86400
.
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.