[アップデート] AWS WAF がアプリケーションレイヤー(L7)層の DDoS 保護機能をサポートしました

[アップデート] AWS WAF がアプリケーションレイヤー(L7)層の DDoS 保護機能をサポートしました

Clock Icon2025.06.14

こんにちは!クラウド事業本部コンサルティング部のたかくに(@takakuni_)です。

AWS WAF がアプリケーションレイヤー(L7)層の DDoS 保護機能をサポートしました。re:Inforce 2025 が近づいていますが、非常に興味深いアップデートがきましたね。

https://aws.amazon.com/about-aws/whats-new/2025/06/aws-waf-automatic-application-layer-ddos-protection/

アップデート内容

今回のアップデートは「AWS WAF で L7 向けの DDoS 保護を目的とした保護機能および、マネージドルールが追加されました。」というものです。

従来、この DDoS 保護をカバーする方法として Shield Advanced が考えられましたが、月額 3,000 USD からと、価格感が合わなかったりしていたのではないでしょうか。

ドキュメントを見てみると、今回の DDoS 保護を目的とした保護機能は Resource-level DDoS protection、マネージドルールグループは AWS managed rule group DDoS protection と呼ばれています。

https://docs.aws.amazon.com/waf/latest/developerguide/waf-anti-ddos.html

Resource-level DDoS protection

Resource-level DDoS protection は、執筆時点で ALB に対してのみ利用可能な機能です。クライアント IP アドレスと X-Forwarded-For(XFF)ヘッダーの両方で DDoS の評価を行います。

悪意のあるソースが特定された時の保護モードとして、高負荷な状態や DDoS の可能性がある場合のみ制限する Active under DDoS と、永続的に保護し続ける Always on があります。

ドキュメントによると、Active under DDoS モードは ALB を保護するほとんどのユースケースで推奨されています。

Active under DDoS is the default protective mode and is recommended for most use cases.

https://docs.aws.amazon.com/waf/latest/developerguide/waf-anti-ddos-alb.html

AWS managed rule group DDoS protection

AWS managed rule group DDoS protection は、 AWS のマネージドルールを追加して保護する機能です。Resource-level DDoS protection を補完する役割で利用(併用)します。

Resource-level DDoS protection と違い、CloudFront など、 ALB 以外のリソースでも利用可能に拡張されます。

The advanced tier of DDoS protections is offered through the AWSManagedRulesAntiDDoSRuleSet. The managed rule group complements the resource-level tier of protection, with the following notable differences:

  • Protection extends to both Application Load Balancers and CloudFront distributions
  • Traffic baselines are created for your protected resources to improve detection of novel attack patterns.
  • Protective behavior is activated according to sensitivity levels you select.
  • Manages and labels requests to protected resources during probable DDoS events.

https://docs.aws.amazon.com/waf/latest/developerguide/waf-anti-ddos.html

What's New によると、機械学習アルゴリズムを利用して、通常のトラフィックパターンからの異常を検出するようです。

This AWS Managed Rule group monitors traffic data to establish a baseline within minutes of activation, then leverages machine learning models to detect anomalies from normal traffic patterns.

What's New at AWS - Cloud Innovation & News

AWSManagedRulesAntiDDoSRuleSet

AWSManagedRulesAntiDDoSRuleSet という名前のマネージドなルールグループを利用し、各リクエストに対してラベリングを行います。

ラベリングされたリクエストを元に DDoS 攻撃の可能性が高いリクエストを検出します。

緩和する時の挙動に challenging と blocking があり、Sensitivity(感度)を元に設定します。マネジメントコンソールの表記を見ると、 challenging モードでは Sensitivity を high、blocking を low にすることが推奨されています。

2025-06-13 at 23.42.23-Add managed rule groups  WAF & Shield  Global.png

https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-anti-ddos.html

ルール一覧

AWSManagedRulesAntiDDoSRuleSet はルールグループに分類されるのですが、まとまっているルール一覧は少し特殊で、 Sensitivity 別の挙動を上書きするようなルールで構成されています。

  • ChallengeAllDuringEvent
    • 検出された DDoS イベントの中で challenging 可能と判定されたリクエスト
  • ChallengeDDoSRequests
    • challenging の Sensitivity にマッチしたリクエスト
  • DDoSRequests
    • blocking の Sensitivity にマッチしたリクエスト

2025-06-14 at 01.04.20-Add managed rule groups  WAF & Shield  Global.png

Block アクションとして一番最初に評価するルールに配置すること

ドキュメントによると、もっともパフォーマンスを発揮できるのは Allow ルールアクション群が終わってから一番最初に配置すること(Block アクションとして一番最初に評価するルール)のようです。コストの兼ね合いもありますが、パフォーマンスを最大限発揮したい場合は、Block の評価順において、なるべく前に配置しましょう。

Do not limit the requests that you send to the Anti-DDoS rule group – This rule group operates best when you configure it in to monitor all web traffic that you aren't explicitly allowing through. Position it in your web ACL to be evaluated only after rules with the Allow rule action and before all other rules.

https://docs.aws.amazon.com/waf/latest/developerguide/waf-managed-protections-best-practices.html

必ず DEV, STG でテストを実施すること/本番もカウントモードで一定期間運用すること

DDoS protection に限らずですが、DEV, STG でテストを実施しましょう。納得いくまでです。

終わったら、本番もカウントモードで一定期間運用しましょう

ログやメトリクスで DDoS が疑われるラベルが出てきます。それらを元に Block するリクエストを決めていきましょう。(遅くないです)

詳しい方法は以下に記載があります。

https://docs.aws.amazon.com/waf/latest/developerguide/waf-anti-ddos-deploying.html

コスト

コストについて触れていきます。

Resource-level DDoS protection に関しては、なんと、AWS WAF の利用費から、追加料金なしで利用できます。

AWS managed rule group DDoS protection は 1 ヶ月あたり 20 USD(時間按分)の基本料金と、100万リクエストあたり 0.15 USD のリクエスト料金が発生します。

https://aws.amazon.com/waf/pricing/?nc1=h_ls

ちなみに AWSManagedRulesAntiDDoSRuleSet は 50 WCU で提供されています。

https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-anti-ddos.html

AWS Shield Advanced との違い

最後に AWS Shield Advanced との違いについて触れていきます。

AWS Shield Advanced では主に、次の機能がついてきます。

  • 自動緩和
    • Web ACL 上でルールを自動的に作成/更新し攻撃を緩和する機能
  • Shield Response Team (SRT)
    • 有人によって AWS WAF へのリクエストをモニタリングし、カスタム緩和策(ルール)を作成してくれる機能
  • AWS WAF の利用費が無料

https://pages.awscloud.com/rs/112-TZM-766/images/AWS-Black-Belt_2024_AWS-Shield-Advanced_0920_v1.pdf

AWS Shield Advanced と Anti-DDoS rule group の DDoS 検知ロジックが一緒かどうかに関しては公開情報が見当たりませんでした。(あったら教えてください)

マネジメントコンソールを覗いてみる

画面だけを覗く形になりますが、AWS WAF の設定画面を見てみましょう。

下記は AWS WAF の Web ACL を、 ALB 向けに作成する画面です。

2025-06-13 at 17.36.14-Create web ACL - Step 1 Describe web ACL and associate it to AWS resources  WAF & Shield  Global.png

ALB を選択すると、Resource level DDoS protection - new が表示されました。

2025-06-13 at 17.37.15-Create web ACL - Step 1 Describe web ACL and associate it to AWS resources  WAF & Shield  Global.png

続いて AWS managed rule group DDoS protection に移ります。

AntiDDoS Protection for Layer 7 attacks という名前のマネージドルールが追加されていていますね。

2025-06-14 at 01.58.59-Add managed rule groups  WAF & Shield  Global.png

続いて challenging と blocking を行う、Sensitivity(感度)を設定します。

再掲になりますが、マネジメントコンソールの表記を見ると、 challenging モードでは Sensitivity を high、blocking を low にすることが推奨されています。

2025-06-14 at 01.59.57-Add managed rule groups  WAF & Shield  Global.png

こちらも再掲になりますが、ルールグループに構成されるルールは Sensitivity 別の挙動を上書きするようなルールで構成されています。

2025-06-14 at 02.00.05-Add managed rule groups  WAF & Shield  Global.png

まとめ

以上、「AWS WAF がアプリケーションレイヤー(L7)層の DDoS 保護機能をサポートしました。」でした。

出てきたばかりで、まだ評価ができていない段階ですが、AWS Shield Advanced よりもライトに DDoS 対策できて非常に試してみたくなる、アップデートだなと思いました。

引き続き有人監視部分や自動緩和に関しては AWS Shield Advanced が一歩リードしていますが、安く感じるのは私だけではないはず、ぜひトライしてみてください。

このブログがどなたかの参考になれば幸いです。クラウド事業本部コンサルティング部のたかくに(@takakuni_)でした!

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.