[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F3MM6NS3EX1Z63YKSVMXFR":3,"skill-same:01M6F3MM6NS3EX1Z63YKSVMXFR":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":23,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":63,"install":64,"resources":77},"01M6F3MM6NS3EX1Z63YKSVMXFR","aws-cost-optimization",null,"Reduce AWS spend with rightsizing, autoscaling, commitment planning, and storage lifecycle policies. Use when running FinOps reviews, lowering cloud bills, or improving cost-per-request metrics.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-aws-cost-optimization\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"cost optimization","Optimization","aws","cost","aws cost optimization","main","2026","when","request","reduce","autoscaling","reviews","relevant","scripts","critical","os","platform","security","community","storage lifecycle","only","access","devops-security","metrics","finops","storage","2026-11-10 10:12:30",false,"---\nname: aws-cost-optimization\ndescription: Reduce AWS spend with rightsizing, autoscaling, commitment planning,\n  and storage lifecycle policies. Use when running FinOps reviews, lowering cloud\n  bills, or improving cost-per-request metrics.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# AWS Cost Optimization\n\nApply practical FinOps controls to reduce AWS spend without sacrificing reliability or performance.\n\n## When to Use This Skill\n\n- Monthly AWS bill spikes unexpectedly or exceeds budget thresholds\n- Preparing cost reviews with engineering and finance teams\n- Rightsizing EC2, RDS, EKS, or Lambda workloads after load testing\n- Choosing between Savings Plans, Reserved Instances, or on-demand pricing\n- Setting up automated budget alerts and anomaly detection\n- Cleaning up unused resources (unattached EBS, idle load balancers, old snapshots)\n- Optimizing data transfer costs across regions and AZs\n\n## Prerequisites\n\n- AWS CLI v2 installed and configured (`aws configure`)\n- IAM permissions: `ce:*`, `budgets:*`, `ec2:Describe*`, `cloudwatch:PutMetricAlarm`, `s3:PutLifecycleConfiguration`\n- Cost Explorer enabled in the AWS billing console (takes 24 hours to populate)\n- Cost allocation tags activated in the Billing console\n\n## Cost Review Workflow\n\nStart read-only with the confirmed account\u002Fprofile\u002Fregions and least-privilege billing access; the permission list is illustrative, not a role to grant wholesale. Dates, dollar thresholds and identifiers below are examples. Review savings against availability, recovery objectives and retrieval\u002Ftransition costs. No automatic purchases, resource shutdown, deletion or lifecycle expiry follows from identifying a recommendation. Export the current lifecycle configuration and review the full replacement before applying it; noncurrent-version expiration permanently removes recovery copies.\n\n1. Tag every resource by team, service, environment, and cost center.\n2. Enable Cost Explorer and activate Cost and Usage Reports (CUR) to S3.\n3. Identify top spend drivers by service, account, and tag.\n4. Rightsize underutilized compute and storage based on CloudWatch metrics.\n5. Apply commitment discounts (Savings Plans or RIs) for stable baseline usage.\n6. Set budgets, anomaly alerts, and build KPI dashboards.\n7. Review monthly and iterate.\n\n## Cost Explorer CLI Commands\n\n```bash\n# Get cost and usage for the last 30 days grouped by service\naws ce get-cost-and-usage \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY \\\n  --metrics \"BlendedCost\" \"UnblendedCost\" \"UsageQuantity\" \\\n  --group-by Type=DIMENSION,Key=SERVICE\n\n# Get cost forecast for the next 30 days\naws ce get-cost-forecast \\\n  --time-period Start=2026-03-24,End=2026-04-24 \\\n  --metric UNBLENDED_COST \\\n  --granularity MONTHLY\n\n# Get cost grouped by a specific tag (e.g., team)\naws ce get-cost-and-usage \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY \\\n  --metrics \"UnblendedCost\" \\\n  --group-by Type=TAG,Key=team\n\n# Get rightsizing recommendations for EC2\naws ce get-rightsizing-recommendation \\\n  --service \"AmazonEC2\" \\\n  --configuration '{\"RecommendationTarget\":\"SAME_INSTANCE_FAMILY\",\"BenefitsConsidered\":true}'\n\n# Get Savings Plans purchase recommendation\naws ce get-savings-plans-purchase-recommendation \\\n  --savings-plans-type COMPUTE_SP \\\n  --term-in-years ONE_YEAR \\\n  --payment-option NO_UPFRONT \\\n  --lookback-period-in-days SIXTY_DAYS\n\n# Get Savings Plans utilization\naws ce get-savings-plans-utilization \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY\n\n# Get Reserved Instance utilization\naws ce get-reservation-utilization \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY\n```\n\n## Budget Alerts\n\n```bash\n# Create a monthly cost budget with email alert at 80% and 100%\naws budgets create-budget \\\n  --account-id 123456789012 \\\n  --budget '{\n    \"BudgetName\": \"monthly-total\",\n    \"BudgetLimit\": {\"Amount\": \"5000\", \"Unit\": \"USD\"},\n    \"TimeUnit\": \"MONTHLY\",\n    \"BudgetType\": \"COST\",\n    \"CostFilters\": {},\n    \"CostTypes\": {\n      \"IncludeTax\": true,\n      \"IncludeSubscription\": true,\n      \"UseBlended\": false\n    }\n  }' \\\n  --notifications-with-subscribers '[\n    {\n      \"Notification\": {\n        \"NotificationType\": \"ACTUAL\",\n        \"ComparisonOperator\": \"GREATER_THAN\",\n        \"Threshold\": 80,\n        \"ThresholdType\": \"PERCENTAGE\"\n      },\n      \"Subscribers\": [{\"SubscriptionType\": \"EMAIL\", \"Address\": \"finops@example.com\"}]\n    },\n    {\n      \"Notification\": {\n        \"NotificationType\": \"ACTUAL\",\n        \"ComparisonOperator\": \"GREATER_THAN\",\n        \"Threshold\": 100,\n        \"ThresholdType\": \"PERCENTAGE\"\n      },\n      \"Subscribers\": [{\"SubscriptionType\": \"EMAIL\", \"Address\": \"finops@example.com\"}]\n    }\n  ]'\n\n# List all budgets\naws budgets describe-budgets --account-id 123456789012\n\n# Enable Cost Anomaly Detection monitor for all services\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"all-services\",\n    \"MonitorType\": \"DIMENSIONAL\",\n    \"MonitorDimension\": \"SERVICE\"\n  }'\n\n# Create anomaly subscription (alert when impact > $50)\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"cost-alerts\",\n    \"MonitorArnList\": [\"arn:aws:ce::123456789012:anomalymonitor\u002Fmonitor-id\"],\n    \"Subscribers\": [{\"Type\": \"EMAIL\", \"Address\": \"finops@example.com\"}],\n    \"Threshold\": 50,\n    \"Frequency\": \"DAILY\"\n  }'\n```\n\n## CloudWatch Cost Alarm\n\n```bash\n# Create alarm for estimated charges exceeding $4000\naws cloudwatch put-metric-alarm --region us-east-1 \\\n  --alarm-name \"billing-alarm-4000\" \\\n  --alarm-description \"Alert when estimated charges exceed $4000\" \\\n  --metric-name EstimatedCharges \\\n  --namespace AWS\u002FBilling \\\n  --statistic Maximum \\\n  --period 21600 \\\n  --threshold 4000 \\\n  --comparison-operator GreaterThanThreshold \\\n  --evaluation-periods 1 \\\n  --dimensions Name=Currency,Value=USD \\\n  --alarm-actions \"arn:aws:sns:us-east-1:123456789012:billing-alerts\" \\\n  --treat-missing-data notBreaching\n```\n\n## Find and Clean Unused Resources\n\n```bash\n# List unattached EBS volumes (wasted storage spend)\naws ec2 describe-volumes \\\n  --filters Name=status,Values=available \\\n  --query \"Volumes[].{ID:VolumeId,Size:Size,Created:CreateTime}\" \\\n  --output table\n\n# Find old EBS snapshots (older than 90 days)\naws ec2 describe-snapshots \\\n  --owner-ids self \\\n  --query \"Snapshots[?StartTime\u003C='2025-12-24'].{ID:SnapshotId,Size:VolumeSize,Date:StartTime}\" \\\n  --output table\n\n# List unused Elastic IPs (charged when not associated)\naws ec2 describe-addresses \\\n  --query \"Addresses[?AssociationId==null].{IP:PublicIp,AllocId:AllocationId}\" \\\n  --output table\n\n# Inspect target health (zero healthy targets is not proof a load balancer is unused)\naws elbv2 describe-target-health \\\n  --target-group-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup\u002Fmy-tg\u002Fabc123\n\n# List RDS instances and their utilization\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name CPUUtilization \\\n  --dimensions Name=DBInstanceIdentifier,Value=mydb \\\n  --start-time 2026-03-17T00:00:00Z \\\n  --end-time 2026-03-24T00:00:00Z \\\n  --period 86400 \\\n  --statistics Average\n```\n\n## S3 Lifecycle Cost Optimization\n\n```bash\n# Apply tiered lifecycle policy to reduce storage costs\naws s3api put-bucket-lifecycle-configuration \\\n  --bucket my-data-bucket \\\n  --lifecycle-configuration '{\n    \"Rules\": [\n      {\n        \"ID\": \"TierDownOldData\",\n        \"Status\": \"Enabled\",\n        \"Filter\": {\"Prefix\": \"\"},\n        \"Transitions\": [\n          {\"Days\": 30, \"StorageClass\": \"STANDARD_IA\"},\n          {\"Days\": 90, \"StorageClass\": \"GLACIER\"},\n          {\"Days\": 365, \"StorageClass\": \"DEEP_ARCHIVE\"}\n        ],\n        \"NoncurrentVersionTransitions\": [\n          {\"NoncurrentDays\": 30, \"StorageClass\": \"GLACIER\"}\n        ],\n        \"NoncurrentVersionExpiration\": {\"NoncurrentDays\": 90}\n      },\n      {\n        \"ID\": \"CleanupIncompleteUploads\",\n        \"Status\": \"Enabled\",\n        \"Filter\": {\"Prefix\": \"\"},\n        \"AbortIncompleteMultipartUpload\": {\"DaysAfterInitiation\": 7}\n      }\n    ]\n  }'\n```\n\n## Terraform Budget and Alarm Example\n\n```hcl\nresource \"aws_budgets_budget\" \"monthly\" {\n  name         = \"monthly-total\"\n  budget_type  = \"COST\"\n  limit_amount = \"5000\"\n  limit_unit   = \"USD\"\n  time_unit    = \"MONTHLY\"\n\n  notification {\n    comparison_operator        = \"GREATER_THAN\"\n    threshold                  = 80\n    threshold_type             = \"PERCENTAGE\"\n    notification_type          = \"ACTUAL\"\n    subscriber_email_addresses = [\"finops@example.com\"]\n  }\n\n  notification {\n    comparison_operator        = \"GREATER_THAN\"\n    threshold                  = 100\n    threshold_type             = \"PERCENTAGE\"\n    notification_type          = \"ACTUAL\"\n    subscriber_email_addresses = [\"finops@example.com\"]\n  }\n}\n\nresource \"aws_cloudwatch_metric_alarm\" \"billing\" {\n  alarm_name          = \"billing-alarm-4000\"\n  comparison_operator = \"GreaterThanThreshold\"\n  evaluation_periods  = 1\n  metric_name         = \"EstimatedCharges\"\n  namespace           = \"AWS\u002FBilling\"\n  period              = 21600\n  statistic           = \"Maximum\"\n  threshold           = 4000\n  alarm_description   = \"Billing exceeds $4000\"\n  alarm_actions       = [aws_sns_topic.billing_alerts.arn]\n\n  dimensions = {\n    Currency = \"USD\"\n  }\n}\n```\n\n## Scheduling Non-Production Shutdowns\n\n```bash\n# Stop all dev instances tagged Environment=dev (run via EventBridge + Lambda)\naws ec2 describe-instances \\\n  --filters \"Name=tag:Environment,Values=dev\" \"Name=instance-state-name,Values=running\" \\\n  --query \"Reservations[].Instances[].InstanceId\" \\\n  --output text | xargs -n1 aws ec2 stop-instances --instance-ids\n\n# Scale down dev ECS services to zero at night\naws ecs update-service \\\n  --cluster dev-cluster \\\n  --service dev-api \\\n  --desired-count 0\n```\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Cost Explorer returns empty data | CE not enabled or \u003C 24h old | Enable in Billing console, wait 24h |\n| Budget alert not firing | SNS subscription not confirmed | Check email and confirm subscription |\n| Rightsizing shows no recommendations | Not enough usage data | Wait 14 days for sufficient metrics |\n| Savings Plans utilization low | Over-purchased or workload changed | Review and adjust SP coverage |\n| Unattached EBS not showing | Wrong region queried | Loop through all active regions |\n| Billing alarm never triggers | Billing metrics only in us-east-1 | Create alarm in us-east-1 region |\n| CUR data missing in S3 | Report not configured or bucket policy wrong | Verify CUR setup in Billing console |\n| Tag-based cost allocation empty | Tags not activated | Activate cost allocation tags in Billing |\n\n## Related Skills\n\n- aws-ec2 (`aws-ec2`) - EC2 operations, sizing, and Spot instances\n- aws-s3 (`aws-s3`) - S3 storage classes and lifecycle controls\n- aws-rds (`aws-rds`) - RDS instance sizing and reserved instances\n- aws-lambda (`aws-lambda`) - Lambda pricing and concurrency tuning\n- terraform-aws (`terraform-aws`) - Codifying cost guardrails in IaC\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# AWS Cost Optimization\n\nApply practical FinOps controls to reduce AWS spend without sacrificing reliability or performance.\n\n## When to Use This Skill\n\n- Monthly AWS bill spikes unexpectedly or exceeds budget thresholds\n- Preparing cost reviews with engineering and finance teams\n- Rightsizing EC2, RDS, EKS, or Lambda workloads after load testing\n- Choosing between Savings Plans, Reserved Instances, or on-demand pricing\n- Setting up automated budget alerts and anomaly detection\n- Cleaning up unused resources (unattached EBS, idle load balancers, old snapshots)\n- Optimizing data transfer costs across regions and AZs\n\n## Prerequisites\n\n- AWS CLI v2 installed and configured (`aws configure`)\n- IAM permissions: `ce:*`, `budgets:*`, `ec2:Describe*`, `cloudwatch:PutMetricAlarm`, `s3:PutLifecycleConfiguration`\n- Cost Explorer enabled in the AWS billing console (takes 24 hours to populate)\n- Cost allocation tags activated in the Billing console\n\n## Cost Review Workflow\n\nStart read-only with the confirmed account\u002Fprofile\u002Fregions and least-privilege billing access; the permission list is illustrative, not a role to grant wholesale. Dates, dollar thresholds and identifiers below are examples. Review savings against availability, recovery objectives and retrieval\u002Ftransition costs. No automatic purchases, resource shutdown, deletion or lifecycle expiry follows from identifying a recommendation. Export the current lifecycle configuration and review the full replacement before applying it; noncurrent-version expiration permanently removes recovery copies.\n\n1. Tag every resource by team, service, environment, and cost center.\n2. Enable Cost Explorer and activate Cost and Usage Reports (CUR) to S3.\n3. Identify top spend drivers by service, account, and tag.\n4. Rightsize underutilized compute and storage based on CloudWatch metrics.\n5. Apply commitment discounts (Savings Plans or RIs) for stable baseline usage.\n6. Set budgets, anomaly alerts, and build KPI dashboards.\n7. Review monthly and iterate.\n\n## Cost Explorer CLI Commands\n\n```bash\n# Get cost and usage for the last 30 days grouped by service\naws ce get-cost-and-usage \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY \\\n  --metrics \"BlendedCost\" \"UnblendedCost\" \"UsageQuantity\" \\\n  --group-by Type=DIMENSION,Key=SERVICE\n\n# Get cost forecast for the next 30 days\naws ce get-cost-forecast \\\n  --time-period Start=2026-03-24,End=2026-04-24 \\\n  --metric UNBLENDED_COST \\\n  --granularity MONTHLY\n\n# Get cost grouped by a specific tag (e.g., team)\naws ce get-cost-and-usage \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY \\\n  --metrics \"UnblendedCost\" \\\n  --group-by Type=TAG,Key=team\n\n# Get rightsizing recommendations for EC2\naws ce get-rightsizing-recommendation \\\n  --service \"AmazonEC2\" \\\n  --configuration '{\"RecommendationTarget\":\"SAME_INSTANCE_FAMILY\",\"BenefitsConsidered\":true}'\n\n# Get Savings Plans purchase recommendation\naws ce get-savings-plans-purchase-recommendation \\\n  --savings-plans-type COMPUTE_SP \\\n  --term-in-years ONE_YEAR \\\n  --payment-option NO_UPFRONT \\\n  --lookback-period-in-days SIXTY_DAYS\n\n# Get Savings Plans utilization\naws ce get-savings-plans-utilization \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY\n\n# Get Reserved Instance utilization\naws ce get-reservation-utilization \\\n  --time-period Start=2026-02-01,End=2026-03-01 \\\n  --granularity MONTHLY\n```\n\n## Budget Alerts\n\n```bash\n# Create a monthly cost budget with email alert at 80% and 100%\naws budgets create-budget \\\n  --account-id 123456789012 \\\n  --budget '{\n    \"BudgetName\": \"monthly-total\",\n    \"BudgetLimit\": {\"Amount\": \"5000\", \"Unit\": \"USD\"},\n    \"TimeUnit\": \"MONTHLY\",\n    \"BudgetType\": \"COST\",\n    \"CostFilters\": {},\n    \"CostTypes\": {\n      \"IncludeTax\": true,\n      \"IncludeSubscription\": true,\n      \"UseBlended\": false\n    }\n  }' \\\n  --notifications-with-subscribers '[\n    {\n      \"Notification\": {\n        \"NotificationType\": \"ACTUAL\",\n        \"ComparisonOperator\": \"GREATER_THAN\",\n        \"Threshold\": 80,\n        \"ThresholdType\": \"PERCENTAGE\"\n      },\n      \"Subscribers\": [{\"SubscriptionType\": \"EMAIL\", \"Address\": \"finops@example.com\"}]\n    },\n    {\n      \"Notification\": {\n        \"NotificationType\": \"ACTUAL\",\n        \"ComparisonOperator\": \"GREATER_THAN\",\n        \"Threshold\": 100,\n        \"ThresholdType\": \"PERCENTAGE\"\n      },\n      \"Subscribers\": [{\"SubscriptionType\": \"EMAIL\", \"Address\": \"finops@example.com\"}]\n    }\n  ]'\n\n# List all budgets\naws budgets describe-budgets --account-id 123456789012\n\n# Enable Cost Anomaly Detection monitor for all services\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"all-services\",\n    \"MonitorType\": \"DIMENSIONAL\",\n    \"MonitorDimension\": \"SERVICE\"\n  }'\n\n# Create anomaly subscription (alert when impact > $50)\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"cost-alerts\",\n    \"MonitorArnList\": [\"arn:aws:ce::123456789012:anomalymonitor\u002Fmonitor-id\"],\n    \"Subscribers\": [{\"Type\": \"EMAIL\", \"Address\": \"finops@example.com\"}],\n    \"Threshold\": 50,\n    \"Frequency\": \"DAILY\"\n  }'\n```\n\n## CloudWatch Cost Alarm\n\n```bash\n# Create alarm for estimated charges exceeding $4000\naws cloudwatch put-metric-alarm --region us-east-1 \\\n  --alarm-name \"billing-alarm-4000\" \\\n  --alarm-description \"Alert when estimated charges exceed $4000\" \\\n  --metric-name EstimatedCharges \\\n  --namespace AWS\u002FBilling \\\n  --statistic Maximum \\\n  --period 21600 \\\n  --threshold 4000 \\\n  --comparison-operator GreaterThanThreshold \\\n  --evaluation-periods 1 \\\n  --dimensions Name=Currency,Value=USD \\\n  --alarm-actions \"arn:aws:sns:us-east-1:123456789012:billing-alerts\" \\\n  --treat-missing-data notBreaching\n```\n\n## Find and Clean Unused Resources\n\n```bash\n# List unattached EBS volumes (wasted storage spend)\naws ec2 describe-volumes \\\n  --filters Name=status,Values=available \\\n  --query \"Volumes[].{ID:VolumeId,Size:Size,Created:CreateTime}\" \\\n  --output table\n\n# Find old EBS snapshots (older than 90 days)\naws ec2 describe-snapshots \\\n  --owner-ids self \\\n  --query \"Snapshots[?StartTime\u003C='2025-12-24'].{ID:SnapshotId,Size:VolumeSize,Date:StartTime}\" \\\n  --output table\n\n# List unused Elastic IPs (charged when not associated)\naws ec2 describe-addresses \\\n  --query \"Addresses[?AssociationId==null].{IP:PublicIp,AllocId:AllocationId}\" \\\n  --output table\n\n# Inspect target health (zero healthy targets is not proof a load balancer is unused)\naws elbv2 describe-target-health \\\n  --target-group-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup\u002Fmy-tg\u002Fabc123\n\n# List RDS instances and their utilization\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name CPUUtilization \\\n  --dimensions Name=DBInstanceIdentifier,Value=mydb \\\n  --start-time 2026-03-17T00:00:00Z \\\n  --end-time 2026-03-24T00:00:00Z \\\n  --period 86400 \\\n  --statistics Average\n```\n\n## S3 Lifecycle Cost Optimization\n\n```bash\n# Apply tiered lifecycle policy to reduce storage costs\naws s3api put-bucket-lifecycle-configuration \\\n  --bucket my-data-bucket \\\n  --lifecycle-configuration '{\n    \"Rules\": [\n      {\n        \"ID\": \"TierDownOldData\",\n        \"Status\": \"Enabled\",\n        \"Filter\": {\"Prefix\": \"\"},\n        \"Transitions\": [\n          {\"Days\": 30, \"StorageClass\": \"STANDARD_IA\"},\n          {\"Days\": 90, \"StorageClass\": \"GLACIER\"},\n          {\"Days\": 365, \"StorageClass\": \"DEEP_ARCHIVE\"}\n        ],\n        \"NoncurrentVersionTransitions\": [\n          {\"NoncurrentDays\": 30, \"StorageClass\": \"GLACIER\"}\n        ],\n        \"NoncurrentVersionExpiration\": {\"NoncurrentDays\": 90}\n      },\n      {\n        \"ID\": \"CleanupIncompleteUploads\",\n        \"Status\": \"Enabled\",\n        \"Filter\": {\"Prefix\": \"\"},\n        \"AbortIncompleteMultipartUpload\": {\"DaysAfterInitiation\": 7}\n      }\n    ]\n  }'\n```\n\n## Terraform Budget and Alarm Example\n\n```hcl\nresource \"aws_budgets_budget\" \"monthly\" {\n  name         = \"monthly-total\"\n  budget_type  = \"COST\"\n  limit_amount = \"5000\"\n  limit_unit   = \"USD\"\n  time_unit    = \"MONTHLY\"\n\n  notification {\n    comparison_operator        = \"GREATER_THAN\"\n    threshold                  = 80\n    threshold_type             = \"PERCENTAGE\"\n    notification_type          = \"ACTUAL\"\n    subscriber_email_addresses = [\"finops@example.com\"]\n  }\n\n  notification {\n    comparison_operator        = \"GREATER_THAN\"\n    threshold                  = 100\n    threshold_type             = \"PERCENTAGE\"\n    notification_type          = \"ACTUAL\"\n    subscriber_email_addresses = [\"finops@example.com\"]\n  }\n}\n\nresource \"aws_cloudwatch_metric_alarm\" \"billing\" {\n  alarm_name          = \"billing-alarm-4000\"\n  comparison_operator = \"GreaterThanThreshold\"\n  evaluation_periods  = 1\n  metric_name         = \"EstimatedCharges\"\n  namespace           = \"AWS\u002FBilling\"\n  period              = 21600\n  statistic           = \"Maximum\"\n  threshold           = 4000\n  alarm_description   = \"Billing exceeds $4000\"\n  alarm_actions       = [aws_sns_topic.billing_alerts.arn]\n\n  dimensions = {\n    Currency = \"USD\"\n  }\n}\n```\n\n## Scheduling Non-Production Shutdowns\n\n```bash\n# Stop all dev instances tagged Environment=dev (run via EventBridge + Lambda)\naws ec2 describe-instances \\\n  --filters \"Name=tag:Environment,Values=dev\" \"Name=instance-state-name,Values=running\" \\\n  --query \"Reservations[].Instances[].InstanceId\" \\\n  --output text | xargs -n1 aws ec2 stop-instances --instance-ids\n\n# Scale down dev ECS services to zero at night\naws ecs update-service \\\n  --cluster dev-cluster \\\n  --service dev-api \\\n  --desired-count 0\n```\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Cost Explorer returns empty data | CE not enabled or \u003C 24h old | Enable in Billing console, wait 24h |\n| Budget alert not firing | SNS subscription not confirmed | Check email and confirm subscription |\n| Rightsizing shows no recommendations | Not enough usage data | Wait 14 days for sufficient metrics |\n| Savings Plans utilization low | Over-purchased or workload changed | Review and adjust SP coverage |\n| Unattached EBS not showing | Wrong region queried | Loop through all active regions |\n| Billing alarm never triggers | Billing metrics only in us-east-1 | Create alarm in us-east-1 region |\n| CUR data missing in S3 | Report not configured or bucket policy wrong | Verify CUR setup in Billing console |\n| Tag-based cost allocation empty | Tags not activated | Activate cost allocation tags in Billing |\n\n## Related Skills\n\n- aws-ec2 (`aws-ec2`) - EC2 operations, sizing, and Spot instances\n- aws-s3 (`aws-s3`) - S3 storage classes and lifecycle controls\n- aws-rds (`aws-rds`) - RDS instance sizing and reserved instances\n- aws-lambda (`aws-lambda`) - Lambda pricing and concurrency tuning\n- terraform-aws (`terraform-aws`) - Codifying cost guardrails in IaC\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":32,"source":49,"license":14,"category":50,"metadata":51,"date_added":54,"description":7,"source_repo":55,"source_type":36,"compatibility":56,"license_source":57},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":52,"version":53},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-aws-cost-optimization",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add boisenoise\u002Fskills-collections --skill aws-cost-optimization",{"tool":70,"command":71},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill aws-cost-optimization",{"tool":73,"command":74},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill aws-cost-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-aws-cost-optimization\u002FSKILL.md",true,[],[79,88,96,105,113,121],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":83,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":87},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":87},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":104},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":104},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":104},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":104},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]