-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_wafv2: UNABLE to go lower than value 100 for "RateBasedStatementProperty" #31742
Comments
Although the issue is reproducible using below CDK code: import * as cdk from 'aws-cdk-lib';
import * as wafv2 from 'aws-cdk-lib/aws-wafv2';
export class CdktestStack extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const wafAcl = new wafv2.CfnWebACL(this, 'RootWAF', {
defaultAction: {
allow: {}
},
scope: 'CLOUDFRONT',
visibilityConfig: {
cloudWatchMetricsEnabled: true,
metricName: 'WAF',
sampledRequestsEnabled: true
},
rules: [
{
name: 'Rate-Limit-Requests',
priority: 0,
action: {
block: {}
},
visibilityConfig: {
cloudWatchMetricsEnabled: true,
metricName: 'Rate-Limit-Requests',
sampledRequestsEnabled: true,
},
statement: {
rateBasedStatement: {
aggregateKeyType: 'IP',
limit: 60,
evaluationWindowSec: 60
},
}
}
]
});
}
} where it gives error during deployment:
If we check the documentation for @urda The above error is thrown by CloudFormation, not the CDK code. Per CloudFormation documentation, the minimum value for Thanks, |
It's out of date from what AWS says the service supports: https://aws.amazon.com/about-aws/whats-new/2024/08/aws-waf-rate-based-rules-lower-rate-limits/#:~:text=AWS%20WAF%20now%20supports%20setting,previous%20minimum%20of%20100%20requests. |
@urda Thanks for your response. I could also see that in WAFv2 API reference at RateBasedStatement. Looks like CloudFormation doesn't support the lower limit yet. Request you to open an issue at https://github.com/aws-cloudformation/cloudformation-coverage-roadmap since the support needs to be added on CloudFormation side (also link this issue) and you get update on it whenever it's fixed. Thanks, |
Describe the bug
I am unable to set my
limit
for aRateBasedStatementProperty
below 100. Attempting to do so results in a stack error:Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
I am able to set a rate below 100.
Current Behavior
Unable to set a rate below 100, must be done via web console in AWS.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.162.1 (build 10aa526)
Framework Version
No response
Node.js Version
v18.16.0
OS
macOS
Language
Python
Language Version
Python 3.12.0
Other information
No response
The text was updated successfully, but these errors were encountered: