title: Using AWS WAF with Serverless Associate WAF
body: <p>I have created a Web ACL in my AWS account in the AWS WAF and assigned it some rules. In my serverless.yml file I have used the - <a href="https://www.serverless.com/plugins/serverless-associate-waf" rel="nofollow noreferrer">serverless-associate-waf</a> plugin.</p>
  <p>But when I go to my Web ACLs &gt; my acl &gt; Associated AWS Resources, I do not see the associated API Gateway listed there.</p>
  <p>Here is how my serverless.yml file looks:</p>
  <pre><code>service: ${opt:product}
  
  plugins:
      - serverless-domain-manager
      - serverless-apigw-binary
      - serverless-associate-waf
  
  custom:
      associateWaf:
          name: name-of-my-acl
      esLogs:
          endpoint: link.amazonaws.com
          index: &quot;${opt:stage}-logs&quot;
          includeApiGWLogs: true
          retentionInDays: 30
      stage: ${opt:stage, 'dev'}
      region: ${opt:region, 'ap-south-1'}
      accountId: ${opt:accountId}
      awsBucket: ${opt:awsBucket, 'documents'}
      awsPermaBucket: ${opt:awsPermaBucket, 'perma-documents-dev'}
      cryptoKey: ${opt:cryptoKey}
      apigwBinary:
          types:
              - 'multipart/form-data'
      customDomain:
          domainName: ${opt:stage}-${opt:product}-api.io
          basePath: &quot;&quot;
          stage: ${self:custom.stage}
          createRoute53Record: true
  
  provider:
      vpc:
          securityGroupIds:
              - sg-1234
          subnetIds:
              - subnet-1234
              - subnet-1234
      environment:
          region: ${self:custom.region}
          stage: ${self:custom.stage}
          module: ${opt:product}
          awsBucket: ${self:custom.awsBucket}
          authToken: ${opt:authToken}
          accountId: ${opt:accountId}
          awsPermaBucket: ${self:custom.awsPermaBucket}
          cryptoKey: ${opt:cryptoKey}
      iamRoleStatements:
          - Effect: Allow
            Action:
                - logs:CreateLogGroup
                - logs:CreateLogStream
                - logs:PutLogEvents
                - logs:DescribeLogStreams
            Resource: &quot;*&quot;
          - Effect: Allow
            Action:
                - s3:*
            Resource: &quot;*&quot;
          - Effect: &quot;Allow&quot;
            Action:
                - &quot;sqs:*&quot;
            Resource: &quot;arn:aws:sqs:${opt:region}:*:${opt:stage}-${opt:product}-sqs-queue&quot;
      name: aws
      runtime: nodejs12.x
      stage: ${self:custom.stage}
      region: ${self:custom.region}
      memorySize: 256
      timeout: 30
      package:
          exclude:
              - &quot;*/**&quot;
          include:
              - build/**
              - node_modules/**
  
  functions:
      orgSettingsAPI:
          name: ${self:service}-${self:custom.stage}-api
          handler: build/src/lambda.handler
          events:
              - http:
                    method: any
                    path: /api/{proxy+}
                    authorizer:
                        arn: arn:aws:lambda:${opt:region}:${self:custom.accountId}:function:authenticator-${self:custom.stage}-api
                        resultTtlInSeconds: 60
                        identitySource: method.request.header.Authorization
                        identityValidationExpression: ^Bearer.+
                    cors:
                        origins:
                          - &quot;*&quot;
                        headers:
                          - Content-Type
                          - X-Amz-Date
                          - Authorization
                          - X-Api-Key
                          - X-Amz-Security-Token
                        allowCredentials: true
                        maxAge: 86400
              - http:
                    method: any
                    path: /internal/{proxy+}
          vpc:
              securityGroupIds:
                  - sg-1234
              subnetIds:
                  - subnet-1234
                  - subnet-1234
          environment:
              SqsQueueName: ${opt:stage}-${opt:product}-sqs-queue
          reservedConcurrency: 10
          events:
              - sqs:
                    arn:
                        Fn::GetAtt:
                            - SqsQueue
                            - Arn
                    batchSize: 1
  
  resources:
      Resources:
          GatewayResponse:
              Type: &quot;AWS::ApiGateway::GatewayResponse&quot;
              Properties:
                  ResponseParameters:
                      gatewayresponse.header.Access-Control-Allow-Origin: &quot;'*'&quot;
                      gatewayresponse.header.Access-Control-Allow-Headers: &quot;'*'&quot;
                  ResponseType: EXPIRED_TOKEN
                  RestApiId:
                      Ref: &quot;ApiGatewayRestApi&quot;
                  StatusCode: &quot;401&quot;
          AuthFailureGatewayResponse:
              Type: &quot;AWS::ApiGateway::GatewayResponse&quot;
              Properties:
                  ResponseParameters:
                      gatewayresponse.header.Access-Control-Allow-Origin: &quot;'*'&quot;
                      gatewayresponse.header.Access-Control-Allow-Headers: &quot;'*'&quot;
                  ResponseType: UNAUTHORIZED
                  RestApiId:
                      Ref: &quot;ApiGatewayRestApi&quot;
                  StatusCode: &quot;401&quot;
        
  </code></pre>
  <p>When I debugged the deployment process it says:</p>
  <p>Serverless: Unable to find WAF named 'name-of-my-acl'. Am I naming it wrong or using it wrong?</p>
  <p>I do not understand what is the name I should be using for my WAF in the serverless.yml file.</p>