Package: aws-solutions-constructs.aws-wafwebacl-alb
aws-wafwebacl-alb 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_albTypescript@aws-solutions-constructs/aws-wafwebacl-albJavasoftware.amazon.awsconstructs.services.wafwebaclalbOverviewThis AWS Solutions Construct implements an AWS WAF web ACL connected to an Application Load Balancer.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps}from'aws-cdk-lib';import{WafwebaclToAlbProps,WafwebaclToAlb}from"@aws-solutions-constructs/aws-wafwebacl-alb";//UseanexistingALB,suchasonecreatedbyRoute53toAlborAlbToLambdaconstexistingLoadBalancer=previouslyCreatedLoadBalancer//Note-allalbconstructsturnonELBloggingbydefault,sorequirethatanenvironmentincludingaccount//andregionbeprovidedwhencreatingthestack////newMyStack(app,'id',{env:{account:'123456789012',region:'us-east-1'}});////ThisconstructcanonlybeattachedtoaconfiguredApplicationLoadBalancer.newWafwebaclToAlb(this,'test-wafwebacl-alb',{existingLoadBalancerObj:existingLoadBalancer});Pythonfromaws_solutions_constructs.aws_route53_albimportRoute53ToAlbfromaws_solutions_constructs.aws_wafwebacl_albimportWafwebaclToAlbProps,WafwebaclToAlbfromaws_cdkimport(aws_route53asroute53,Stack)fromconstructsimportConstruct# Use an existing ALB, such as one created by Route53toAlb or AlbToLambdaexistingLoadBalancer=previouslyCreatedLoadBalancer# Note - all alb constructs turn on ELB logging by default, so require that an environment including account# and region be provided when creating the stack## MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))## This construct can only be attached to a configured Application Load Balancer.WafwebaclToAlb(self,'test_wafwebacl_alb',existing_load_balancer_obj=existingLoadBalancer)Javaimportsoftware.constructs.Construct;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awscdk.services.route53.*;importsoftware.amazon.awsconstructs.services.wafwebaclalb.*;// Use an existing ALB, such as one created by Route53toAlb or AlbToLambdafinalexistingLoadBalancer=previouslyCreatedLoadBalancer// Note - all alb constructs turn on ELB logging by default, so require that an environment including account// and region be provided when creating the stack//// new MyStack(app, "id", StackProps.builder()//         .env(Environment.builder()//                 .account("123456789012")//                 .region("us-east-1")//                 .build());//// This construct can only be attached to a configured Application Load Balancer.newWafwebaclToAlb(this,"test-wafwebacl-alb",newWafwebaclToAlbProps.Builder().existingLoadBalancerObj(existingLoadBalancer).build());Pattern Construct PropsNameTypeDescriptionexistingLoadBalancerObjelbv2.ApplicationLoadBalancerThe existing Application Load Balancer Object that will be protected with the WAF web ACL.Note that a WAF web ACL can only be added to a configured Application Load Balancer, so this construct only accepts an existing ApplicationLoadBalancer and does not accept applicationLoadBalancerProps.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.loadBalancerelbv2.ApplicationLoadBalancerReturns an instance of the Application Load Balancer Object created by the pattern.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 CloudWatchApplication Load BalancerUser provided Application Load Balancer object is used as-isArchitecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.