interface FunctionUrlOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Lambda.FunctionUrlOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#FunctionUrlOptions |
Java | software.amazon.awscdk.services.lambda.FunctionUrlOptions |
Python | aws_cdk.aws_lambda.FunctionUrlOptions |
TypeScript (source) | aws-cdk-lib » aws_lambda » FunctionUrlOptions |
Options to add a url to a Lambda function.
Example
import * as lambda from 'aws-cdk-lib/aws-lambda';
declare const fn: lambda.Function;
const fnUrl = fn.addFunctionUrl({
authType: lambda.FunctionUrlAuthType.AWS_IAM,
});
new cloudfront.Distribution(this, 'MyDistribution', {
defaultBehavior: {
origin: origins.FunctionUrlOrigin.withOriginAccessControl(fnUrl),
},
});
Properties
| Name | Type | Description |
|---|---|---|
| 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. |
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.

.NET
Go
Java
Python
TypeScript (