xiaohongshu
xiaohongshu
aws-cost-optimization
Optimize AWS costs through resource rightsizing and savings strategies
Full skill instructions
Reduce AWS spending while maintaining performance and reliability.
| Attribute | Value |
|---|---|
| AWS Services | Cost Explorer, Budgets, Trusted Advisor |
| Complexity | Medium |
| Est. Time | 30-60 min analysis |
| Prerequisites | Cost & Usage Reports access |
| Parameter | Type | Description | Validation |
|---|---|---|---|
| time_period | string | Analysis period | last_30_days, last_90_days |
| scope | array | Service types | ["EC2", "RDS", "S3"] |
| Parameter | Type | Default | Description |
|---|---|---|---|
| savings_target | float | 20 | Target savings % |
| include_recommendations | bool | true | Include AWS recommendations |
| tag_filter | object | {} | Filter by tags |
┌─────────────────────────────────────────────────────────┐
│ COST OPTIMIZATION │
├─────────────────────────────────────────────────────────┤
│ 1. RIGHT SIZE │ Match resources to actual usage │
│ 2. SAVINGS PLANS │ Commit for 30-72% savings │
│ 3. SPOT/RESERVED │ Use discount pricing models │
│ 4. STORAGE TIER │ Move data to cheaper storage │
│ 5. CLEANUP │ Remove unused resources │
└─────────────────────────────────────────────────────────┘
| Strategy | Effort | Savings |
|---|---|---|
| Right-sizing | Low | 10-50% |
| Graviton (arm64) | Medium | 40% |
| Spot Instances | Medium | 60-90% |
| Savings Plans | Low | 30-72% |
| Reserved Instances | Low | 30-60% |
| Scheduled scaling | Medium | 20-40% |
| Strategy | Effort | Savings |
|---|---|---|
| Right-sizing | Low | 10-40% |
| Reserved Instances | Low | 30-60% |
| Aurora Serverless | Medium | Variable |
| Multi-AZ review | Low | 50% (if not needed) |
| Storage optimization | Low | 10-30% |
| Strategy | Effort | Savings |
|---|---|---|
| Intelligent-Tiering | Low | 20-40% |
| Lifecycle policies | Low | 40-80% |
| Glacier transition | Low | 80-95% |
| Cleanup old versions | Low | 10-30% |
| Compression | Medium | 20-50% |
# Get cost by service
aws ce get-cost-and-usage \
--time-period Start=2024-01-01,End=2024-01-31 \
--granularity MONTHLY \
--metrics BlendedCost \
--group-by Type=DIMENSION,Key=SERVICE
# Get rightsizing recommendations
aws ce get-rightsizing-recommendation \
--service EC2 \
--configuration '{
"RecommendationTarget": "SAME_INSTANCE_FAMILY",
"BenefitsConsidered": true
}'
aws budgets create-budget \
--account-id 123456789012 \
--budget '{
"BudgetName": "Monthly-Total",
"BudgetLimit": {"Amount": "1000", "Unit": "USD"},
"TimeUnit": "MONTHLY",
"BudgetType": "COST"
}' \
--notifications-with-subscribers '[{
"Notification": {
"NotificationType": "ACTUAL",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 80,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [{
"SubscriptionType": "EMAIL",
"Address": "[email protected]"
}]
}]'
# Get Savings Plans recommendations
aws ce get-savings-plans-purchase-recommendation \
--savings-plans-type COMPUTE_SP \
--term-in-years ONE_YEAR \
--payment-option NO_UPFRONT \
--lookback-period-in-days SIXTY_DAYS
| Symptom | Cause | Solution |
|---|---|---|
| Unexpected costs | Unused resources | Enable Cost Anomaly Detection |
| Data transfer spike | Cross-region/AZ | Use VPC endpoints |
| Storage growth | No lifecycle rules | Implement policies |
| NAT Gateway costs | Heavy outbound | Use VPC endpoints |
aws ce create-anomaly-monitor \
--anomaly-monitor '{
"MonitorName": "cost-anomalies",
"MonitorType": "DIMENSIONAL",
"MonitorDimension": "SERVICE"
}'
aws ce create-anomaly-subscription \
--anomaly-subscription '{
"SubscriptionName": "alert-subscription",
"MonitorArnList": ["arn:aws:ce::...:anomalymonitor/..."],
"Subscribers": [{
"Type": "EMAIL",
"Address": "[email protected]"
}],
"Threshold": 100
}'
weekly:
- Check Cost Anomaly alerts
- Review Trusted Advisor recommendations
monthly:
- Run rightsizing analysis
- Review Savings Plans utilization
- Check Reserved Instance coverage
- Analyze data transfer costs
- Clean up unused resources
quarterly:
- Evaluate Savings Plans purchase
- Architecture optimization review
- Tag compliance audit
def test_cost_optimization_compliance():
# Check for unattached EBS volumes
volumes = ec2.describe_volumes(
Filters=[{'Name': 'status', 'Values': ['available']}]
)
assert len(volumes['Volumes']) == 0, "Unattached EBS volumes found"
# Check for unused Elastic IPs
addresses = ec2.describe_addresses()
unattached = [a for a in addresses['Addresses'] if 'InstanceId' not in a]
assert len(unattached) == 0, "Unused Elastic IPs found"
assets/cost-checklist.yaml - Cost optimization checklistxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience