Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
aws-nukeをカスタマイズしてみた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ishizuka Shiori
February 29, 2024
Technology
750
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
aws-nukeをカスタマイズしてみた
Ishizuka Shiori
February 29, 2024
More Decks by Ishizuka Shiori
See All by Ishizuka Shiori
Architecting on AWS での学びをもとに環境構築してみた
ishizukashiori
0
200
Other Decks in Technology
See All in Technology
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
200
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
280
Classmethod Company Deck
satoshi7
1
730
Kiro Crewをはじめよう
kizawa2020
1
160
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
180
会社説明資料
persolserverworks
0
9.8k
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
160
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
820
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Browser Spec: Testing Hotwire with Ruby
takahashim
1
130
WasmをRustにする
sansantech
PRO
0
260
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Building the Perfect Custom Keyboard
takai
2
910
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
エンジニアに許された特別な時間の終わり
watany
109
250k
Tell your own story through comics
letsgokoyo
1
1.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
360
The Curse of the Amulet
leimatthew05
3
16k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Transcript
aws-nukeをカスタマイズしてみた Ishizuka.s
自己紹介 石塚 詩織 Ishizuka Shiori ・AWS歴7か月 ・好きなサービス:Lambda ・興味があるサービス:Bedrock ・金融機関向けシステム
aws-nukeとは AWSアカウント内のリソースを強制的に 削除するコマンドラインツール
aws-nukeとは AWSアカウント内のリソースを強制的に 削除するコマンドラインツール 無料
いきなり結論 aws-nukeは 削除対象/対象外の指定など 結構柔軟にカスタマイズできる!
なぜカスタマイズが必要になったのか
社内のsandboxアカウントの リソースを定期的にお掃除したい! でも、消したらまずいリソースもある! aws-nukeいい感じにつかえないかな?
aws-nuke実行までの3ステップ ①対象のアカウントにエイリアスを付与する ②設定ファイルを用意する ③コマンドを実行
aws-nuke実行までの3ステップ ①対象のアカウントにエイリアスを付与する ②設定ファイルを用意する ③コマンドを実行する
nuke-config.yaml|必須項目 対象リージョン ※IAM, Route53, Cloud Frontはglobal 絶対に消したくないアカウント ※ダミーを入れておく必要性あり 削除対象アカウント
リソース名指定 nuke-config.yaml|オプション タグ指定 削除対象外を指定 削除対象を指定 ※指定なし/空文字の場合、excludes しなかったリソースは全て削除される 削除保護を無効化(=true)
コマンドを実行する $ ./aws-nuke-v2.25.0-linux-amd64 -c ./nuke-config.yaml 削除対象リソースの一覧と、実行結果の一覧が表示される <dry-run> $ ./aws-nuke-v2.25.0-linux-amd64 -c
./nuke-config.yaml --no-dry-run 削除が実行される <run>
dry-run実行結果
Filtersの定義方法大攻略
リソースタイプ リソースの詳細[作成日, 最終利用日, 名前, タグ] リソースタイプ リソース名
リソースタイプ リソースの詳細[作成日, 最終利用日, 名前, タグ] リソース名
① ② ③ ④ <typeで検索条件を柔軟にできる> exact ①デフォルトは文字列完全一致 ②明示することも可能 glob ③ワイルドカード
Contains ④部分一致 Regex ⑤正規表現 dateOlderThan ⑥日時指定 ⑤ ⑥
もっとaws-nuke
リソースタイプを特定するには?
$ ./aws-nuke-v2.25.0-linux-amd64 resource-types
<評価論理> 明示的なexcludesが最も優先される ※IAMポリシーのDenyと同じ
まとめ ⚫ aws-nukeは全リソースを簡単に削除できる ⚫ 指定するリソースタイプの一覧表示も可能 ⚫ 特定のリソースを削除する・しないことも可能 • リソースタイプ •
リソース名 • タグ • 最終利用日 etc…
Next… AWS公式ドキュメントより
⚫ aws-nuke GitHubのReadme ⚫ aws-nukeで作るマルチアカウントのお掃除機能 ⚫ aws-nuke で AWS リソースを一掃する
参考資料