associate rest api with WAF

0

Hi team,

is it possible to associate a private REST API GW with an existing AWS WAF knowing that,

  • the REST API GW is created via AWS CDK
  • the AWS WAF is created via the AWS console

how can I associate my rest API gw with the existing waf via CDK?

Thank you!

1 Answer
0
Accepted Answer

You need to create a CfnWebACLAssociation in AWS CDK and point it to the previously created web ACL and the resource to protect. Note that AWS WAF requires a Regional web ACL for API Gateway. Therefore, ensure that the web ACL you are associating with the API Gateway is regional. For more details: https://aws.amazon.com/blogs/devops/easily-protect-your-aws-cdk-defined-infrastructure-with-aws-wafv2/

AWS
TonyG
answered 6 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions