Optimize cloud costs through right-sizing resources, tagging strategies, reserved instances and savings plans, and spend analysis. Use this for cloud cost reduction, infrastructure cost analysis, and implementing cost governance policies.
English | 日本語
AWS、Azure、GCPにまたがるクラウドコスト最適化のための戦略とパターン。
パフォーマンスと信頼性を維持しながらクラウド支出を削減するための体系的なコスト最適化戦略を実装します。
節約: オンデマンドの30-72%
期間: 1年または3年
支払い: 全額前払い/一部前払い/前払いなし
柔軟性: スタンダードまたはコンバーティブル
コンピュートセービングプラン: 66%節約
EC2インスタンスセービングプラン: 72%節約
適用対象: EC2、Fargate、Lambda
柔軟性: インスタンスファミリー、リージョン、OS横断
節約: オンデマンドの最大90%
最適な用途: バッチジョブ、CI/CD、ステートレスワークロード
リスク: 2分間の中断通知
戦略: レジリエンスのためオンデマンドと混在
resource "aws_s3_bucket_lifecycle_configuration" "example" {
bucket = aws_s3_bucket.example.id
rule {
id = "transition-to-ia"
status = "Enabled"
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 90
storage_class = "GLACIER"
}
expiration {
days = 365
}
}
}
locals {
common_tags = {
Environment = "production"
Project = "my-project"
CostCenter = "engineering"
Owner = "team@example.com"
ManagedBy = "terraform"
}
}
resource "aws_instance" "example" {
ami = "ami-12345678"
instance_type = "t3.medium"
tags = merge(
local.common_tags,
{
Name = "web-server"
}
)
}
参照: references/tagging-standards.md参照
# AWS予算
resource "aws_budgets_budget" "monthly" {
name = "monthly-budget"
budget_type = "COST"
limit_amount = "1000"
limit_unit = "USD"
time_period_start = "2024-01-01_00:00"
time_unit = "MONTHLY"
notification {
comparison_operator = "GREATER_THAN"
threshold = 80
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["team@example.com"]
}
}
開発: t3.small RDS
ステージング: t3.large RDS
本番: リードレプリカ付きr6g.2xlarge RDS
ホットデータ: S3 Standard
ウォームデータ: S3 Standard-IA(30日)
コールドデータ: S3 Glacier(90日)
アーカイブ: S3 Deep Archive(365日)
resource "aws_autoscaling_policy" "scale_up" {
name = "scale-up"
scaling_adjustment = 2
adjustment_type = "ChangeInCapacity"
cooldown = 300
autoscaling_group_name = aws_autoscaling_group.main.name
}
resource "aws_cloudwatch_metric_alarm" "cpu_high" {
alarm_name = "cpu-high"
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "2"
metric_name = "CPUUtilization"
namespace = "AWS/EC2"
period = "60"
statistic = "Average"
threshold = "80"
alarm_actions = [aws_autoscaling_policy.scale_up.arn]
}
references/tagging-standards.md - タグ付け規約assets/cost-analysis-template.xlsx - コスト分析スプレッドシートterraform-module-library - リソースプロビジョニング用multi-cloud-architecture - クラウド選択用Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer