Resource Type definition for AWS::Lambda::Url
See the AWS Lambda documentation for more information.
Configure Lambda url with no auth.
resource "awscc_lambda_url" "example_no_auth" {
target_function_arn = var.function_arn
auth_type = "NONE"
}
variable "function_arn" {
type = string
description = "ARN of the lambda function"
}
Configure Lambda url set with AWS_IAM
for auth.
resource "awscc_lambda_url" "example_auth_iam" {
target_function_arn = var.function_arn
auth_type = "AWS_IAM"
cors = {
allow_credentials = true
allow_origins = ["*"]
allow_methods = ["*"]
allow_headers = ["date", "keep-alive"]
expose_headers = ["keep-alive", "date"]
max_age = 86400
}
}
variable "function_arn" {
type = string
description = "ARN of the lambda function"
}
auth_type
(String) Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.target_function_arn
(String) The Amazon Resource Name (ARN) of the function associated with the Function URL.cors
(Attributes) (see below for nested schema)invoke_mode
(String) The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.qualifier
(String) The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.function_arn
(String) The full Amazon Resource Name (ARN) of the function associated with the Function URL.function_url
(String) The generated url for this resource.id
(String) Uniquely identifies the resource.cors
Optional:
allow_credentials
(Boolean) Specifies whether credentials are included in the CORS request.allow_headers
(List of String) Represents a collection of allowed headers.allow_methods
(List of String) Represents a collection of allowed HTTP methods.allow_origins
(List of String) Represents a collection of allowed origins.expose_headers
(List of String) Represents a collection of exposed headers.max_age
(Number)Import is supported using the following syntax:
$ terraform import awscc_lambda_url.example <resource ID>