Elastic Beanstalk configuration for WAF

0

I recently added a WAF Web ACL to my Elastic Beanstalk (EB) environment. Every time I launch a new EB environment the load balancer changes and I have to manually updated the "Associated AWS Resources" for the Web ACL. Is there an ebextensions configuration I can use to do that automatically? I found a similar question from 10 months ago but the answers seem overly complicated. Surely there is something I can add to my ebextensions?

1回答
0
承認された回答

How about creating a config under "/ebextensions/" that ties the WAF to it?
I thought that ALB could be tied to WAF every time by creating the following configuration.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html

Resources:
  WebACLAssociation:
    Type: AWS::WAFv2::WebACLAssociation
    Properties:
      ResourceArn: '`{ "Ref" : "AWSEBV2LoadBalancer" }`'
      WebACLArn: {Web ACL ARN}

If this setup does not work, I think the only way to do it is to use Eventbridge and Lambda as in the answer at the URL you described.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.eventbridge.html

profile picture
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ