Package: aws-solutions-constructs.aws-wafwebacl-cloudfront
aws-wafwebacl-cloudfront module---All classes are under active development and subject to non-backward compatible changes or removal in any
future version. These are not subject to theSemantic Versioningmodel.
This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_wafwebacl_cloudfrontTypescript@aws-solutions-constructs/aws-wafwebacl-cloudfrontJavasoftware.amazon.awsconstructs.services.wafwebaclcloudfrontOverviewThis AWS Solutions Construct implements an AWS WAF web ACL connected to Amazon CloudFront.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps}from'aws-cdk-lib';import{CloudFrontToS3}from'@aws-solutions-constructs/aws-cloudfront-s3';import{WafwebaclToCloudFront}from"@aws-solutions-constructs/aws-wafwebacl-cloudfront";constcloudfrontToS3=newCloudFrontToS3(this,'test-cloudfront-s3',{});//ThisconstructcanonlybeattachedtoaconfiguredCloudFront.newWafwebaclToCloudFront(this,'test-wafwebacl-cloudfront',{existingCloudFrontWebDistribution:cloudfrontToS3.cloudFrontWebDistribution});Pythonfromaws_solutions_constructs.aws_cloudfront_s3importCloudFrontToS3fromaws_solutions_constructs.aws_wafwebacl_cloudfrontimportWafwebaclToCloudFrontfromaws_cdkimportStackfromconstructsimportConstructcloudfront_to_s3=CloudFrontToS3(self,'test_cloudfront_s3')# This construct can only be attached to a configured CloudFront.WafwebaclToCloudFront(self,'test_wafwebacl_cloudfront',existing_cloud_front_web_distribution=cloudfront_to_s3.cloud_front_web_distribution)Javaimportsoftware.constructs.Construct;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awsconstructs.services.cloudfronts3.*;importsoftware.amazon.awsconstructs.services.wafwebaclcloudfront.*;finalCloudFrontToS3cloudfrontToS3=newCloudFrontToS3(this,"test-cloudfront-s3",newCloudFrontToS3Props.Builder().build());// This construct can only be attached to a configured CloudFront.newWafwebaclToCloudFront(this,"test-wafwebacl-cloudfront",newWafwebaclToCloudFrontProps.Builder().existingCloudFrontWebDistribution(cloudfrontToS3.getCloudFrontWebDistribution()).build());Pattern Construct PropsNameTypeDescriptionexistingCloudFrontWebDistributioncloudfront.DistributionThe existing CloudFront instance that will be protected with the WAF web ACL.Note that a WAF web ACL can only be added to a configured CloudFront, so this construct only accepts an existing Distribution and does not accept cloudfrontProps.existingWebaclObj?waf.CfnWebACLExisting instance of a WAF web ACL, an error will occur if this and props is set.webaclProps?waf.CfnWebACLPropsOptional user-provided props to override the default props for the AWS WAF web ACL. To use a different collection of managed rule sets, specify a new rules property. Use ourwrapManagedRuleSet(managedGroupName: string, vendorName: string, priority: number)function from core to create an array entry from each desired managed rule set.Pattern PropertiesNameTypeDescriptionwebaclwaf.CfnWebACLReturns an instance of the waf.CfnWebACL created by the construct.cloudFrontWebDistributioncloudfront.DistributionReturns an instance of cloudfront.Distribution created by the construct.Default settingsOut of the box implementation of the Construct without any override will set the following defaults:AWS WAFDeploy a WAF web ACL with 7AWS managed rule groups.AWSManagedRulesBotControlRuleSetAWSManagedRulesKnownBadInputsRuleSetAWSManagedRulesCommonRuleSetAWSManagedRulesAnonymousIpListAWSManagedRulesAmazonIpReputationListAWSManagedRulesAdminProtectionRuleSetAWSManagedRulesSQLiRuleSetNote that the default rules can be replaced by specifying the rules property of CfnWebACLPropsSend metrics to Amazon CloudWatchAmazon CloudFrontUser provided CloudFront object is used as-isArchitecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.