When serverless deploy tried to associate an aws waf to my aws api gateway, it threw this error:
Other than downgrading my node, serverless, plugin and SDK to older versions, anyone found a fix?
Thanks!
Karl
Environment: darwin, node 18.6.0, framework 3.22.0, plugin 6.2.2, SDK 4.3.2
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
TypeError: this.config.name.trim is not a function
at AssociateWafPlugin.updateWafAssociation (/Users/kninh/node_modules/serverless-associate-waf/lib/index.js:58:66)
at PluginManager.runHooks (/usr/local/lib/node_modules/serverless/lib/classes/plugin-manager.js:530:15)
at async PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/plugin-manager.js:565:9)
at async PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/plugin-manager.js:604:7)
at async Serverless.run (/usr/local/lib/node_modules/serverless/lib/serverless.js:174:5)
at async /usr/local/lib/node_modules/serverless/scripts/serverless.js:771:9
Serverless.yml
resources:
Resources:
WafAcl:
Type: 'AWS::WAFv2::WebACL'
Properties:
Scope: REGIONAL
custom:
associateWaf:
name: !Ref WafAcl
version: Regional