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
20240414_cloudgirl_ec2_costdown
Search
snowwhite
April 14, 2024
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20240414_cloudgirl_ec2_costdown
2024年4月14日に行われたJAWS-UGクラウド女子会で登壇した資料です。
snowwhite
April 14, 2024
More Decks by snowwhite
See All by snowwhite
20260804_NW-JAWS
yuri_snowwhite
1
480
20250625_anthoropic_booth_mini_session
yuri_snowwhite
0
52
20260527_IAM_IdentityCenter_is_a_IIC_management
yuri_snowwhite
0
49
20260521_security_any_AI_is_ray_trusted_loved
yuri_snowwhite
0
100
AWS Global Community Gatherings # 16
yuri_snowwhite
1
50
20251108_SecJAWS_IAMSp
yuri_snowwhite
0
79
20250730_AWS_AmazonQ
yuri_snowwhite
1
120
20250601_storage_and_bigdate_JAWS
yuri_snowwhite
1
93
250226_SecurityJAWS
yuri_snowwhite
2
1.2k
Featured
See All Featured
Accessibility Awareness
sabderemane
1
210
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Docker and Python
trallard
47
4.2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
Why Our Code Smells
bkeepers
PRO
340
58k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
Bash Introduction
62gerente
615
220k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Transcript
EC2のコストを考える 2024/04/14 株式会社ゆめみ 白"雪姫"
自己紹介 Name: 白”雪姫”(Shirayuki) Profile: 2023年8月、ゆめみ入社 ネットワークをメインにH/Wサーバの保守などを経験、その後、セキュリティの世界で物理や 専用クラウドを中心にインフラを経験、最近は AWSを多少触り始める。 苗字を呼ばれるのが嫌いなので、名前 orX名で読んでいただくことが多い
Liked Service: AWS Inspecter X(旧Twitter): @yuri_snowwhite
開発用のEC2って意外に高いと 感じませんか?
1ヶ月(30日仮定) で起動してみる サンプルにしたスペック 東京リージョン t3.micro gp2の30GiB EBS EIP無し AmazonLinux オンデマンド稼働
稼働料金 0.0136 $/hr x 24 h x 30 days EBS料金 0.12 x 30GiB 合計 13.392$(約2008.8円)
使っていない時間は 止めたら良いのでは?
平日夜間帯や土日を停止した場合の料 金を算出
1ヶ月(30日仮定) で起動してみる サンプルにしたスペック 東京リージョン t3.micro gp2の30GiB EBS EIP無し AmazonLinux オンデマンド稼働
起動時間はAM5:00〜PM22:00の 17時間・土日は停止(8日換算) 24hの時は稼働料金は 13.392$(約2008.8円) 稼働料金 0.0136 $/hr x 17 h x 22days EBS料金 0.12 x 30GiB 合計 8.6864$(1580.4円) 差額 4.7056$(705.84円)/月
金額の増加率 グラフも比例的に差分 幅が広がっていく
どうやって時間停止する?
利用したサービス ・稼働しているEC2 ・Amazon EventBridge ・EventBridgeで起動するスクリプト(マネージメントコンソールで選択できる) 起動・停止を実行 時間記載はcron方式
実践-1 Amazon EventBridgeのスケジュールから新規作成。 cron方式を選択して、月曜〜金曜の設定。 この際、Start用とStop用で2スケジュール必要なので注意。 また、時間設定は以下を参考に設定 https://docs.aws.amazon.com/ja_jp/eventbridge/latest/userguide/e b-cron-expressions.html
実践-2 ターゲットAPIのところで「すべての API」でEC2を選択、起動時は「Start」 (停止の時は「Stop」)で検索をすると 該当のスクリプトが出てきます。
実践-3 実践2のスライドで選択すると自動的 にスライドしていき、下記の画面に移 動します。 この"MyData”をインスタンスIDへ書き 換えて完了です。 複数台ある場合は、「,」区切りにて指 定も可能です。 残りはウィザードに従います。
メリットとデメリット メリット ・手軽にコストの削減が出来る ・手動で実行する手間は省ける ・複数台居ても設定をしっかりしていれ ば、停止, 起動漏れはおきない ・起動または停止を変更したいときは AWS EventBridgeで無効化すれば実行
されない様に出来る デメリット ・開発過渡期などの長時間起動が必要 な時には使えない ・パブリックIPを紐付ける設定の場合は 毎回IPが変わってしまう
実際やってみて 4.7056$/month x 12 mon = 56.4672 $ 約8470円 を削減しました。
ご静聴ありがとうございました Fin.