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
Trusted Advisor の対応推奨項目の diff をとる
Search
Mai Aisaka
January 30, 2025
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Trusted Advisor の対応推奨項目の diff をとる
Trusted Advisor つかってますか?週次でのチェックにつかえそうなdiff取る手段をまとめてみました!
Mai Aisaka
January 30, 2025
More Decks by Mai Aisaka
See All by Mai Aisaka
SREやりながらDevRel始めてみた
mist_dev
0
370
開発だけじゃない!SREとして支えるエンジニアリング
mist_dev
1
330
SRE が Ruby アップグレードの時にやっていること (SRE Kaigi 2025 LT)
mist_dev
0
690
1on1やってみてるよ
mist_dev
0
320
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
Agile that works and the tools we love
rasmusluckow
331
22k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Transcript
©iCARE Co.,Ltd Trusted Advisor の対応推奨項目の diff をとる あいさか (@mist_dev)
©iCARE Co.,Ltd 自己紹介 • あいさか (@mist_dev) • iCARE SRE 2年生
• Ruby💎とビール🍺が好き ◦ 日本のクラフトビールが好き • 好きなクラフトビール ◦ 熊本の天草ソナービール🍺 ◦ フルーツスムージーなビールがおいしい
©iCARE Co.,Ltd きょうの話 • Trusted Advisor つかってますか? ◦ AWS 的な構成最適解をチェックして教えてくれる
▪ S3 のブロックパブリックアクセスちゃんと有効にしてる?とか ▪ RDS のバックアップちゃんと取ってる?とか • うちのチームでは週一で項目のチェックをしています ◦ AWS SDK for Ruby v3 で取得し diff を取っています
©iCARE Co.,Ltd きょうの話
©iCARE Co.,Ltd • region は us-east-1 に設定する 準備 require "aws-sdk"
aws_profile_name = ARGV[0] client = Aws::TrustedAdvisor::Client.new( region: 'us-east-1', profile: aws_profile_name )
©iCARE Co.,Ltd • チェックが必要な項目をレベル関係なく全件取得する list_checks で対応を要する項目を取得 checks = [] checks_next_token
= nil loop do options = { language: "ja", max_results: 200, next_token: checks_next_token }.compact results = client. list_checks(options) checks_next_token = results.next_token checks << results.check_summaries break if checks_next_token.nil? end
©iCARE Co.,Ltd list_recommendations で対応を要する項目を取得 • マネジメントコンソールの赤い(error)実施推奨項目を取得する recommends = [] recommends_next_token
= nil loop do options = { status: "error", next_token: recommends_next_token }.compact results = client. list_recommendations(options) recommends_next_token = results.next_token recommends << results.recommendation_summaries break if recommends_next_token.nil? end
©iCARE Co.,Ltd 取得した結果をマージ • 取得した結果をマージし、error項目のタイトルだけをresultとして抽出する ◦ 結果は arn で突き合わせる result
= recommends.flatten.filter_map do |recommend| check = checks.flatten.find { |check| recommend.check_arn == "arn:aws:trustedadvisor:::check/#{check.id}" } check if check && recommend.resources_aggregates.error_count > 0 end
©iCARE Co.,Ltd • 先週分と比較した diff が確認できる ◦ こんなかんじで確認できる。便利 できた
©iCARE Co.,Ltd ある日の diff • \突然の日本語化/ ◦ スルーしたよ
©iCARE Co.,Ltd ©iCARE Co.,Ltd Thank you.