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

SSMドキュメント使ってますか

Avatar for mizutanikizashi mizutanikizashi
November 03, 2025
70

 SSMドキュメント使ってますか

Avatar for mizutanikizashi

mizutanikizashi

November 03, 2025
Tweet

Transcript

  1. © 2025 heptagon inc. All Rights Reserved. 自己紹介 水谷 兆

    <Mizutani Kizashi> ・株式会社ヘプタゴン ・クラウドエンジニア ・幸せを感じるから成功するのであって、  成功したから幸せになるわけではない   ( ショーン・エイカー)       https://x.com/kizashi7512 ‹#› 2
  2. © 2025 heptagon inc. All Rights Reserved. AWS-UG 名古屋 11

    月会!!!(11/19) 「新しくなったAWS BuilderCards でAWS を学ぼう」    ‹#› 3  https://jawsug-nagoya.connpass.com/event/372409/
  3. ‹#› 4 © 2025 heptagon inc. All Rights Reserved. SSM

    ドキュメント使ってますか?
  4. SSM ドキュメントの全体像をざっくり理解! ‹#› 7 © 2025 heptagon inc. All Rights

    Reserved. ・SSM ドキュメントとは何か  - Systems Manager Automation の中心的リソース  - YAML/JSON 形式を定義 ・タイプ  - Command Document (RunCommand )  - Automation Document (マルチステップの自動実行)
  5. SSM ドキュメントの全体像をざっくり理解! ‹#› 8 © 2025 heptagon inc. All Rights

    Reserved. ・SSM ドキュメントとは何か  - Systems Manager Automation の中心的リソース  - YAML/JSON 形式を定義 ・タイプ  - Command Document (RunCommand )  - Automation Document (マルチステップの自動実行)
  6. ‹#› © 2025 heptagon inc. All Rights Reserved. 10 参照:

    https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/run-aws-systems-manager-automation-tasks-synchronously-from-aws-step-functions.html
  7. ‹#› © 2025 heptagon inc. All Rights Reserved. Step Functions

    がオーケストラ全体を管理する “ 指揮者” のような存在 SSM ドキュメントは実際に演奏する “ 演奏者” のような存在 11
  8. © 2025 heptagon inc. All Rights Reserved. 背景:セキュリティ事故防止のため、すべての接続を遮断したい 手動操作の課題:人的ミス・一貫した操作の不備 作成したドキュメントの構成:

    1. EC2 インスタンスの既存SecurityGroup を全てデタッチ 2. 完全に空の新規SecurityGroup 3. 新規作成したSecurityGroup のアタッチ Security Group を一時的に閉じる自動化 ‹#› SSH が フルオープンだよ! 12
  9. © 2025 heptagon inc. All Rights Reserved. セキュリティとの関係 ・再現性と標準化  →

    全チームが同じドキュメントを使うことで、操作手順が統一される ・操作の監査  → CloudTrail, Config, Automation Execution Logs で完全に記録される ・手動操作の排除  → セキュリティ事故の8 割はヒューマンエラー由来 ‹#› 14
  10. © 2025 heptagon inc. All Rights Reserved. AWS 公式ドキュメント https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/run-aws-systems-manager-automation-tasks-synchronously-from-

    aws-step-functions.html https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-ref-sfn.html https://docs.aws.amazon.com/cloud9/latest/user-guide/systems-manager-automation-docs.html https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeStateMachine.html https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-setup-iam.html その他ドキュメント https://hidekazu-konishi.com/entry/add_approval_flow_to_aws_step_functions_ssm.html https://github.com/aws-samples/amazon-stepfunctions-ssm-waitfortasktoken https://www.verizon.com/business/resources/Ta5a/reports/2023-dbir-public-sector-snapshot.pdf 参考文献 ‹#› 15