FunctionUrl

class FunctionUrl : KotlinCustomResource

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

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(aws_lambda_function.test().function_name())
.authorizationType("NONE")
.build());
var testLive = new FunctionUrl("testLive", FunctionUrlArgs.builder()
.functionName(aws_lambda_function.test().function_name())
.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());
}
}

Import

Lambda function URLs can be imported using the function_name or function_name/qualifier, e.g.,

$ pulumi import aws:lambda/functionUrl:FunctionUrl test_lambda_url my_test_lambda_function

Properties

Link copied to clipboard

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.

Link copied to clipboard
val cors: Output<FunctionUrlCors>?

The cross-origin resource sharing (CORS) settings for the function URL. Documented below.

Link copied to clipboard
val functionArn: Output<String>

The Amazon Resource Name (ARN) of the function.

Link copied to clipboard
val functionName: Output<String>

The name (or ARN) of the Lambda function.

Link copied to clipboard
val functionUrl: Output<String>

The HTTP URL endpoint for the function in the format https://<url_id>.lambda-url.<region>.on.aws.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val invokeMode: Output<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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val qualifier: Output<String>?

The alias name or "$LATEST".

Link copied to clipboard
val urlId: Output<String>

A generated ID for the endpoint.

Link copied to clipboard
val urn: Output<String>