interface FunctionUrlProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Lambda.FunctionUrlProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#FunctionUrlProps |
![]() | software.amazon.awscdk.services.lambda.FunctionUrlProps |
![]() | aws_cdk.aws_lambda.FunctionUrlProps |
![]() | aws-cdk-lib » aws_lambda » FunctionUrlProps |
Properties for a FunctionUrl.
Example
// 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
Name | Type | Description |
---|---|---|
function | IFunction | The function to which this url refers. |
auth | Function | The type of authentication that your function URL uses. |
cors? | Function | The cross-origin resource sharing (CORS) settings for your function URL. |
invoke | Invoke | The type of invocation mode that your Lambda function uses. |
function
Type:
IFunction
The function to which this url refers.
It can also be an Alias
but not a Version
.
authType?
Type:
Function
(optional, default: FunctionUrlAuthType.AWS_IAM)
The type of authentication that your function URL uses.
cors?
Type:
Function
(optional, default: No CORS configuration.)
The cross-origin resource sharing (CORS) settings for your function URL.
invokeMode?
Type:
Invoke
(optional, default: InvokeMode.BUFFERED)
The type of invocation mode that your Lambda function uses.