aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.46k stars 597 forks source link

Higher limit lint value for AWS WAF2 Ratelimit #3738

Closed vaclavbarta closed 6 days ago

vaclavbarta commented 1 month ago

Hello, sorry - I'm not sure if this repository relates to my issues, but i think so.

AWS announced at august 2024 the lowering the limit for WAF RateLimit's limit from 100 to 10 here https://aws.amazon.com/about-aws/whats-new/2024/08/aws-waf-rate-based-rules-lower-rate-limits/ but this value cannot be used due cloudformation validation.

But i can't use it through cloudformation (cdk) because values lower than 100 failing on Cloudformation error

Resource handler returned message: "Model validation failed (#/Rules: 2 schema violations found) #/Rules/8/Statement/RateBasedStatement/Limit: failed validation constraint for keyword [minimum] (#/Rules/8/Statement/RateBasedStatement/Limit) #/Rules/9/Statement/RateBasedStatement/Limit: failed validation constraint for keyword [minimum] (#/Rules/9/Statement/RateBasedStatement/Limit)" (RequestToken: REDACTED-606b89, HandlerErrorCode: InvalidRequest)

I found that it is defined also here. Should it be synced please ? :)

https://github.com/aws-cloudformation/cfn-lint/blob/ee77420d94027eb03e2d28b36b265aac5de5d756/src/cfnlint/data/schemas/providers/us_east_1/aws-wafv2-rulegroup.json#L769-L773

Thank you very much Vaclav

kddejong commented 1 month ago

So we get our resource schemas from docs. Unfortunately it is wrong there and that is what service side validation uses. So while we can change it you will still get there.

vaclavbarta commented 1 month ago

Thank you @kddejong for fast response. I checked the zip and really there is 100 🤔 - Didn't you know where this can be reported to somebody who can fix it ? 😎

vaclavbarta commented 1 month ago

I try wrote it to Twitter so we see ;) https://x.com/AWSSupport/status/1844069569633161571

kddejong commented 1 month ago

I can see that its in the process of being changed but I can't say when it will be complete. Hopefully it will be soon.

vaclavbarta commented 2 weeks ago

It seems already changed 😉 we will test it and i will close this issue soon

https://github.com/aws-cloudformation/cfn-lint/blob/main/src/cfnlint/data/schemas/providers/us_east_1/aws-wafv2-rulegroup.json#L771

vaclavbarta commented 6 days ago

Works :) so limit < 100 is available