# FunctionUrlProps

Properties for a FunctionUrl.

Extends: FunctionUrlProps
Extends: FunctionUrlOptions
Used as props by: FunctionUrl

- Source: [`aws-lambda/lib/function-url.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda/lib/function-url.ts#L194)
- Type last changed: v2.21.0 · 22 Apr 2022

## 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

- `authType`: [FunctionUrlAuthType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionUrlAuthType.html) = FunctionUrlAuthType.AWS_IAM — The type of authentication that your function URL uses.

- `cors`: [FunctionUrlCorsOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionUrlCorsOptions.html) — The cross-origin resource sharing (CORS) settings for your function URL.

  **Default:** No CORS configuration.

- `function`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) (required) — The function to which this url refers.

  It can also be an `Alias` but not a `Version`.

- `invokeMode`: [InvokeMode](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.InvokeMode.html) = InvokeMode.BUFFERED — The type of invocation mode that your Lambda function uses.
