FunctionUrlOriginAccessControlProps
- class aws_cdk.aws_cloudfront.FunctionUrlOriginAccessControlProps(*, description=None, origin_access_control_name=None, signing=None)
Bases:
OriginAccessControlBaseProps
Properties for creating a Lambda Function URL Origin Access Control resource.
- Parameters:
description (
Optional
[str
]) – A description of the origin access control. Default: - no descriptionorigin_access_control_name (
Optional
[str
]) – A name to identify the origin access control, with a maximum length of 64 characters. Default: - a generated namesigning (
Optional
[Signing
]) – Specifies which requests CloudFront signs and the signing protocol. Default: SIGV4_ALWAYS
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_lambda as lambda_ # fn: lambda.Function fn_url = fn.add_function_url( auth_type=lambda_.FunctionUrlAuthType.AWS_IAM ) # Define a custom OAC oac = cloudfront.FunctionUrlOriginAccessControl(self, "MyOAC", origin_access_control_name="CustomLambdaOAC", signing=cloudfront.Signing.SIGV4_ALWAYS ) # Set up Lambda Function URL with OAC in CloudFront Distribution cloudfront.Distribution(self, "MyDistribution", default_behavior=cloudfront.BehaviorOptions( origin=origins.FunctionUrlOrigin.with_origin_access_control(fn_url, origin_access_control=oac ) ) )
Attributes
- description
A description of the origin access control.
- Default:
no description
- origin_access_control_name
A name to identify the origin access control, with a maximum length of 64 characters.
- Default:
a generated name
- signing
Specifies which requests CloudFront signs and the signing protocol.