Score:0

CDK WAF Python Multiple Statement values error

br flag

I have AWS WAF CDK that is working with rules, and now I'm trying to add a rule in WAF with multiple statements, but I'm getting this error:

Resource handler returned message: "Error reason: You have used none or multiple values for a field that requires exactly one value., field: STATEMENT, parameter: Statement (Service: Wafv2, Status Code: 400, Request ID: 6a36bfe2-543c-458a-9571-e929142f5df1, Extended Request ID: null)" (RequestToken: b751ae12-bb60-bb75-86c0-346926687ea4, HandlerErrorCode: InvalidRequest)

The block of rule in code:

                {
        'name': 'ruleName',
        'priority': 3,
        'statement': {
            'orStatement': {
                'statements': [
                    {
                        'iPSetReferenceStatement': {
                            'arn': 'arn:myARN'
                            }
                    },
                            {
                        'iPSetReferenceStatement': {
                            'arn': 'arn:myARN'
                            }
                    }
            ]
            }
            },
            'action': {
               'allow': {}
        },
          'visibilityConfig': {
              'sampledRequestsEnabled': True,
               'cloudWatchMetricsEnabled': True,
              'metricName': 'ruleName'
           }
          },
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.