Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20210826 EC2の起動するインスタンスタイプを制御する方法
Search
Masaru Ogura
August 26, 2021
Technology
0
22
20210826 EC2の起動するインスタンスタイプを制御する方法
2021/8/26 JAWS-UG朝会#24の資料です。
Masaru Ogura
August 26, 2021
Tweet
Share
More Decks by Masaru Ogura
See All by Masaru Ogura
20240530 Backlogでスクラムを回してみよう
masaruogura
0
210
20240516 JAWS-UG 朝会 運営の裏側
masaruogura
1
160
20240509 CloudWatch でいろいろなものを監視してみよう
masaruogura
1
190
20240329 第34回 JAWS-UG札幌勉強会 オープニング
masaruogura
0
24
20240216 Amazon Linux 2 を 2023 に移行してみた
masaruogura
1
3.9k
20240202 第33回 JAWS-UG札幌勉強会 オープニング
masaruogura
0
16
20231215 第32回 JAWS-UG札幌勉強会 オープニング
masaruogura
0
16
20230928 第31回 JAWS-UG札幌勉強会 オープニング
masaruogura
0
16
20230630 AWS認定のすすめ
masaruogura
1
560
Other Decks in Technology
See All in Technology
WSUSが非推奨に!? Windowsの更新管理を改めて勉強する!
ebibibi
0
490
令和最新版 Perlコーディングガイド
anatofuz
5
4.2k
AWSの初級者向けAI・ML資格『AWS Certified AI Practitioner』の傾向と対策/So You Want To Pass AWS Certified AI Practitioner
quiver
0
750
テストを楽に書きたい
tomorrowkey
2
240
Vespaを利用したテクいベクトル検索
szdr
3
230
KubeVirt Networking ONIC 2024
orimanabu
4
700
JAWS PANKRATION 2024 配信システムの紹介
yoshimi0227
0
130
今こそ変化対応力を向上させるとき 〜ログラスが FAST に挑戦する理由〜 / Why Loglass is Talking on the Challenge of Agile Framework FAST
shioyang
0
230
なぜ Rack を理解すべきかプレトーク / Why should you understand Rack - Pre-talk
hogelog
0
180
エンジニア向け会社紹介資料
caddi_eng
14
270k
Graph Database と Generative AI の素敵な関係
oracle4engineer
PRO
16
3.1k
受託開発でもアジャイル開発できました / Agile in Contract Development
takaking22
15
6.1k
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Atom: Resistance is Futile
akmur
261
25k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.5k
Practical Orchestrator
shlominoach
186
10k
From Idea to $5000 a Month in 5 Months
shpigford
381
46k
Building Applications with DynamoDB
mza
90
6k
How to train your dragon (web standard)
notwaldorf
87
5.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
Transcript
EC2 の起動するインスタンスタイプを 制限する方法 2021/8/26 Thu Masaru Ogura
自己紹介 • 小倉 大 (マサル) Facebook : https://www.facebook.com/masaru.ogura.71 Twitter :
@MasaruOgura • 株式会社サーバーワークス • ススキノが生んだエンジニア • 2020/2021 APN ALL AWS Certifications Engineer
EC2 の起動するインスタンスタイプを制御する方法 • AWS Service Catalog で制御 • IAM ポリシーで制御
• AWS Config ルールで制御
EC2 の起動するインスタンスタイプを制御する方法 • AWS Service Catalog で制御 • IAM ポリシーで制御
• AWS Config ルールで制御
AWS Service Catalog • AWS 製品カタログの作成、管理 • ポートフォリオから AWS サービスを起動
• ポートフォリオに制限をかけることで リスクを最小化 https://aws.amazon.com/jp/servicecatalog/
https://www.slideshare.net/AmazonWebServicesJapan/20180718-aws-black-belt- online-seminar-aws-service-catalog
Service Catalog で制御 ポートフォリオの制約を設定する
Service Catalog で制御 起動可能なインスタンスタイプを設定する
Service Catalog で制御 ポートフォリオから起動するときにインスタンスタイプを制限できる
EC2 の起動するインスタンスタイプを制御する方法 • AWS Service Catalog で制御 • IAM ポリシーで制御
• AWS Config ルールで制御
AWS IAM • AWS 操作をセキュアに行うための 認証認可の仕組み • IAM ポリシーは AWS
アクセスに対する 権限設定 https://aws.amazon.com/jp/iam/
https://d1.awsstatic.com/webinars/jp/pdf/services/20160921_AWS-BlackBelt-IAM.pdf
IAM ポリシーで制御 IAM ポリシーでインスタンスタイプを制限できる
IAM ポリシーで制御 IAM ポリシーを適用した IAM ユーザーが指定外のインスタンスタイプを 起動しようとすると権限不足により作成が失敗します
EC2 の起動するインスタンスタイプを制御する方法 • AWS Service Catalog で制御 • IAM ポリシーで制御
• AWS Config ルールで制御
AWS Config • AWS リソースの設定を評価、変更管理 • 準拠すべきルールを事前に設定し、ルールに 沿っているかを評価 https://aws.amazon.com/jp/config/
https://www.slideshare.net/AmazonWebServicesJapan/20190618-aws-black-belt- online-seminar-aws-config
AWS Config ルールで制御 Config ルールの desired-instance-type を追加します
AWS Config ルールで制御 パラメータでインスタンスタイプを指定します
AWS Config ルールで制御 Config ルールの 修復アクションを設定します
AWS Config ルールで制御 Systems Manager オートメーションで起動した EC2 を削除します
まとめ • EC2 の起動するインスタンスタイプを制御する方法を3つ紹介 しました。 • 検証環境などで、意図せず大きなインスタンスタイプを選んで、 高額請求が来ないようにすることができます。
参考リンク • AWS Service Catalogで制御された自由を – https://blog.serverworks.co.jp/tech/2020/03/18/servicecatalog/ • Amazon Elastic
Compute Cloud (Amazon EC2) の SCP 例 – https://docs.aws.amazon.com/ja_jp/organizations/latest/userguide/orgs_man age_policies_scps_examples_ec2.html#example-ec2-1 • 自動修復の設定 (コンソール) – https://docs.aws.amazon.com/ja_jp/config/latest/developerguide/remediation .html#setup-autoremediation
ご清聴ありがとうございました。