Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWSIaCレビューのトイルをAIAgentで減らせるか

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
Avatar for nobu13 nobu13
September 19, 2026

 AWSIaCレビューのトイルをAIAgentで減らせるか

Avatar for nobu13

nobu13

September 19, 2026

Other Decks in Programming

Transcript

  1. 自己紹介 伊佐 薫明 今日話すこと Server-side / Data Engineer AWS ×

    Kiro × Agentic Engineering AI Agentを IaC Quality Gateとして どこまで使えるか • 10年以上サーバーサイド / フルスタック経験 • データエンジニアとしても活動 • Kiro × AWS × Agentic Engineeringを検証・発 信中 • 人間を置き換える話ではない • 一次レビューのトイルを減らす話 • 失敗・誤検知も含めて共有 LinkedIn https://www.linkedin.com/in/no-isa/ 発信・検証ログはこちら JAWS-UG LT / AWS IaC Review Agent 2
  2. IaCレビューは「地味だが重要」なトイル IAM 過剰権限・信頼ポリシー Network 0.0.0.0/0・CIDR Reliability Multi-AZ・Backup・SPOF Operations Log retention・Alarm

    Integration EventBridge/API Gateway依存 JAWS-UG LT / AWS IaC Review Agent AI Agentを一次レビューに入れると 人間は「判断が必要なレビュー」へ 集中できるか? 今回の検証では、 Shift Left / Quality Gate / Human-in-the-loop の 実用性を数字で見る。 3
  3. 検証設計:Ground Truthを先に固定 15 10 4 意図的に仕込んだ問題 正常Control 比較条件 3つのCloudFormationを共通で検証 A

    Security/Governance B Reliability/Operations C Integration/ Dependency 比較条件 A cfn-lint 静的解析 baseline B Kiro単体 汎用LLM baseline C Plugin + semantic D Human 専用Agent 人間レビュー 評価指標:TP / FP / FN / TN / Precision / Recall / F1 / Specificity / Review Time JAWS-UG LT / AWS IaC Review Agent 4
  4. aws-iac-review-agent-plugin の背景とアーキテクチャ 背景 • IaCレビューは 属人化しやすい • 静的解析だけ では設計判断が 弱い

    • LLMだけでは 再現性が弱い ⇒Static + Deterministic + Semantic を1つのPluginへ JAWS-UG LT / AWS IaC Review Agent Template → Orchestra tor → Static Rules → Semantic Review → Findings → Human Check cfn-lint / cfn-guard / IAM・Network ・Secret rules cross-resource / missing resource / dependency Plugin + semantic review が IaCレビューの一次Quality Gateとしてどこまで使える かを検証する 5
  5. 結果:Plugin + semantic は約8.5秒で Recall 93.3% ただし誤検知もあり、人間の最終判断は必要 Recall Condition TP

    FN Precision Recall F1 Specificity Time cfn-lint 3 12 100.0% 20.0% 33.3% 100.0% 0.9秒 Kiro単体 13 2 100.0% 86.7% 92.9% 100.0% 210秒 Plugin + semantic 14 1 93.3% 93.3% 93.3% 90.0% 8.5秒 Human 12 3 100.0% 80.0% 88.9% 100.0% 40分 93.3% F1 93.3% Time 8.5秒 Plugin + semantic は Human 40分に対して約8.5秒。 FP=1、Human Reviewが必要なもの多数のため Human-in-the-loop は残す。 JAWS-UG LT / AWS IaC Review Agent 6
  6. 何を拾えて、何を見逃したか Ground Truth 15件をカテゴリ別に見る CloudFormation LINT-01/02 A:2/2 B:2/2 Plugin:2/2 Human:1/2

    全条件が見逃した Security cfn-lint以外は概ね検出 REL-04 SEC-01〜04 Governance GOV-01 cfn-lint/Kiroは見逃し、Kiro/Pluginは検出 Reliability REL-01〜04 REL-04だけ全条件で見逃し Operations OPS-01/02 semanticがAlarm不足を補完 Integration INT-01/DEP-01 semanticとKiro/Humanが強い JAWS-UG LT / AWS IaC Review Agent SQS VisibilityTimeout が Lambda Timeout の 6倍未満 AWS固有の数値ベスト プラクティスは、 semantic reviewでも自 動的には保証されない 7
  7. 人間レビューとの比較:置き換えではなく補完 レビュー時間と品質のバランス Human Review Plugin + semantic 40分 Review Time

    8.5秒 Recall 80.0% Specificity 100.0% Recall 93.3% Review Time Specificity 90.0% F1 88.9% F1 93.3% 誤検知は少ない。一方、LINT-02 / REL-04 / OPS-02 を見逃し。 Human比で約282倍高速。ただしFP=1のため最終判 断は人間へ。 結論:AI Agentは「人間を消す」より、一次レビューのトイルを減らす役割が向いている。 JAWS-UG LT / AWS IaC Review Agent 8
  8. 失敗と制約 Agentは万能ではない。Quality Gateには設計が必要。 1 全条件が見逃した 2 Pluginの誤検知 3 Context依存Finding REL-04:SQS/Lambda

    Timeoutの 6倍推奨 AdminAccess SG / AppSGを 0.0.0.0/0扱い CMK / DLQ / VPC Flow Logs / Rotation 等 AWS固有ルールを決定論化する 改善余地 +MCP活用で改善計画 intrinsic function解釈の弱点 組織要件なしに必須とは断定し ない だから結論は「AIに任せる」ではなく、AI Agentは一次レビューと人間判断の間に置く。 JAWS-UG LT / AWS IaC Review Agent 9
  9. 持ち帰り:Static + Semantic + Human SRE / DevOpsで使うなら、この3点 1 cfn-lintだけでは限界

    Schema / 参照には強いが、設計・依存・欠落には弱い 2 semantic reviewは効く Recall 60.0% → 93.3%。cross-resource問題を補完 3 最終判断は人間に残す FPとContext依存FindingをHuman-in-the-loopで裁く JAWS-UG LT / AWS IaC Review Agent 次の改善 • REL-04 rule追加 • intrinsic function解釈 改善 • GitHubに評価データ 公開 • 人間レビュー結果も 追記 OSSとして、失敗も含め て改善していく。 10
  10. Ground Truth 15件 × 比較対象A/B/C/D A cfn-lint / B Kiro

    / C Plugin+semantic / D Human ◦ 検知 × 見逃し どの方式が何を検知し、何を見逃したかを1枚で確認 全条件が見逃したのは REL-04(SQS VisibilityTimeout < Lambda Timeout×6)。運用知識はまだ人間の判断が必要。 JAWS-UG LT / AWS IaC Review Agent A cfn-lint B Kiro C Plugin+semantic D Human 11