Skip to content
v2.273.0

FunctionUrlProps Struct ​

Properties for a FunctionUrl.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';

declare const function_: lambda.Function;
const functionUrlProps: lambda.FunctionUrlProps = {
  function: function_,

  // the properties below are optional
  authType: lambda.FunctionUrlAuthType.AWS_IAM,
  cors: {
    allowCredentials: false,
    allowedHeaders: ['allowedHeaders'],
    allowedMethods: [lambda.HttpMethod.GET],
    allowedOrigins: ['allowedOrigins'],
    exposedHeaders: ['exposedHeaders'],
    maxAge: cdk.Duration.minutes(30),
  },
  invokeMode: lambda.InvokeMode.BUFFERED,
};

Properties ​

authTypeFunctionUrlAuthTypeauth_typeFunctionUrlAuthTypeauthTypeFunctionUrlAuthTypeAuthTypeFunctionUrlAuthTypeAuthTypeFunctionUrlAuthType= FunctionUrlAuthType.AWS_IAM#
The type of authentication that your function URL uses.
The cross-origin resource sharing (CORS) settings for your function URL.
functionIFunctionfunctionIFunctionfunctionIFunctionFunctionIFunctionFunctionIFunctionrequired#
The function to which this url refers.

It can also be an Alias but not a Version.

invokeModeInvokeModeinvoke_modeInvokeModeinvokeModeInvokeModeInvokeModeInvokeModeInvokeModeInvokeMode= InvokeMode.BUFFERED#
The type of invocation mode that your Lambda function uses.

Used as props by ​