aws-cost-operations
Scannednpx machina-cli add skill zxkane/aws-skills/aws-cost-operations --openclawAWS Cost & Operations
This skill provides comprehensive guidance for AWS cost optimization, monitoring, observability, and operational excellence with integrated MCP servers.
AWS Documentation Requirement
CRITICAL: This skill requires AWS MCP tools for accurate, up-to-date AWS information.
Before Answering AWS Questions
-
Always verify using AWS MCP tools (if available):
mcp__aws-mcp__aws___search_documentationormcp__*awsdocs*__aws___search_documentation- Search AWS docsmcp__aws-mcp__aws___read_documentationormcp__*awsdocs*__aws___read_documentation- Read specific pagesmcp__aws-mcp__aws___get_regional_availability- Check service availability
-
If AWS MCP tools are unavailable:
- Guide user to configure AWS MCP using the
aws-mcp-setupskill (auto-loaded as dependency) - Help determine which option fits their environment:
- Has uvx + AWS credentials → Full AWS MCP Server
- No Python/credentials → AWS Documentation MCP (no auth)
- If cannot determine → Ask user which option to use
- Guide user to configure AWS MCP using the
Integrated MCP Servers
This skill includes 8 MCP servers automatically configured with the plugin:
Cost Management Servers
1. AWS Billing and Cost Management MCP Server
Purpose: Real-time billing and cost management
- View current AWS spending and trends
- Analyze billing details across services
- Track budget utilization
- Monitor cost allocation tags
- Review consolidated billing for organizations
2. AWS Pricing MCP Server
Purpose: Pre-deployment cost estimation and optimization
- Estimate costs before deploying resources
- Compare pricing across regions
- Calculate Total Cost of Ownership (TCO)
- Evaluate different service options for cost efficiency
- Get current pricing information for AWS services
3. AWS Cost Explorer MCP Server
Purpose: Detailed cost analysis and reporting
- Analyze historical spending patterns
- Create custom cost reports
- Identify cost anomalies and trends
- Forecast future costs
- Analyze cost by service, region, or tag
- Generate cost optimization recommendations
Monitoring & Observability Servers
4. Amazon CloudWatch MCP Server
Purpose: Metrics, alarms, and logs analysis
- Query CloudWatch metrics and logs
- Create and manage CloudWatch alarms
- Analyze application performance metrics
- Troubleshoot operational issues
- Set up custom dashboards
- Monitor resource utilization
5. Amazon CloudWatch Application Signals MCP Server
Purpose: Application monitoring and performance insights
- Monitor application health and performance
- Analyze service-level objectives (SLOs)
- Track application dependencies
- Identify performance bottlenecks
- Monitor service map and traces
6. AWS Managed Prometheus MCP Server
Purpose: Prometheus-compatible monitoring
- Query Prometheus metrics
- Monitor containerized applications
- Analyze Kubernetes workload metrics
- Create PromQL queries
- Track custom application metrics
Audit & Security Servers
7. AWS CloudTrail MCP Server
Purpose: AWS API activity and audit analysis
- Analyze AWS API calls and user activity
- Track resource changes and modifications
- Investigate security incidents
- Audit compliance requirements
- Identify unusual access patterns
- Review who made what changes when
8. AWS Well-Architected Security Assessment Tool MCP Server
Purpose: Security assessment against Well-Architected Framework
- Assess security posture against AWS best practices
- Identify security gaps and vulnerabilities
- Get security improvement recommendations
- Review security pillar compliance
- Generate security assessment reports
When to Use This Skill
Use this skill when:
- Optimizing AWS costs and reducing spending
- Estimating costs before deployment
- Monitoring application and infrastructure performance
- Setting up observability and alerting
- Analyzing spending patterns and trends
- Investigating operational issues
- Auditing AWS activity and changes
- Assessing security posture
- Implementing operational excellence
Cost Optimization Best Practices
Pre-Deployment Cost Estimation
Always estimate costs before deploying:
- Use AWS Pricing MCP to estimate resource costs
- Compare pricing across different regions
- Evaluate alternative service options
- Calculate expected monthly costs
- Plan for scaling and growth
Example workflow:
"Estimate the monthly cost of running a Lambda function with
1 million invocations, 512MB memory, 3-second duration in us-east-1"
Cost Analysis and Optimization
Regular cost reviews:
- Use Cost Explorer MCP to analyze spending trends
- Identify cost anomalies and unexpected charges
- Review costs by service, region, and environment
- Compare actual vs. budgeted costs
- Generate cost optimization recommendations
Cost optimization strategies:
- Right-size over-provisioned resources
- Use appropriate storage classes (S3, EBS)
- Implement auto-scaling for dynamic workloads
- Leverage Savings Plans and Reserved Instances
- Delete unused resources and snapshots
- Use cost allocation tags effectively
Budget Monitoring
Track spending against budgets:
- Use Billing and Cost Management MCP to monitor budgets
- Set up budget alerts for threshold breaches
- Review budget utilization regularly
- Adjust budgets based on trends
- Implement cost controls and governance
Monitoring and Observability Best Practices
CloudWatch Metrics and Alarms
Implement comprehensive monitoring:
- Use CloudWatch MCP to query metrics and logs
- Set up alarms for critical metrics:
- CPU and memory utilization
- Error rates and latency
- Queue depths and processing times
- API gateway throttling
- Lambda errors and timeouts
- Create CloudWatch dashboards for visualization
- Use log insights for troubleshooting
Example alarm scenarios:
- Lambda error rate > 1%
- EC2 CPU utilization > 80%
- API Gateway 4xx/5xx error spike
- DynamoDB throttled requests
- ECS task failures
Application Performance Monitoring
Monitor application health:
- Use CloudWatch Application Signals MCP for APM
- Track service-level objectives (SLOs)
- Monitor application dependencies
- Identify performance bottlenecks
- Set up distributed tracing
Container and Kubernetes Monitoring
For containerized workloads:
- Use AWS Managed Prometheus MCP for metrics
- Monitor container resource utilization
- Track pod and node health
- Create PromQL queries for custom metrics
- Set up alerts for container anomalies
Audit and Security Best Practices
CloudTrail Activity Analysis
Audit AWS activity:
- Use CloudTrail MCP to analyze API activity
- Track who made changes to resources
- Investigate security incidents
- Monitor for suspicious activity patterns
- Audit compliance with policies
Common audit scenarios:
- "Who deleted this S3 bucket?"
- "Show all IAM role changes in the last 24 hours"
- "List failed login attempts"
- "Find all actions by a specific user"
- "Track modifications to security groups"
Security Assessment
Regular security reviews:
- Use Well-Architected Security Assessment MCP
- Assess security posture against best practices
- Identify security gaps and vulnerabilities
- Implement recommended security improvements
- Document security compliance
Security assessment areas:
- Identity and Access Management (IAM)
- Detective controls and monitoring
- Infrastructure protection
- Data protection and encryption
- Incident response preparedness
Using MCP Servers Effectively
Cost Analysis Workflow
- Pre-deployment: Use Pricing MCP to estimate costs
- Post-deployment: Use Billing MCP to track actual spending
- Analysis: Use Cost Explorer MCP for detailed cost analysis
- Optimization: Implement recommendations from Cost Explorer
Monitoring Workflow
- Setup: Configure CloudWatch metrics and alarms
- Monitor: Use CloudWatch MCP to track key metrics
- Analyze: Use Application Signals for APM insights
- Troubleshoot: Query CloudWatch Logs for issue resolution
Security Workflow
- Audit: Use CloudTrail MCP to review activity
- Assess: Use Well-Architected Security Assessment
- Remediate: Implement security recommendations
- Monitor: Track security events via CloudWatch
MCP Usage Best Practices
- Cost Awareness: Check pricing before deploying resources
- Proactive Monitoring: Set up alarms for critical metrics
- Regular Reviews: Analyze costs and performance weekly
- Audit Trails: Review CloudTrail logs for compliance
- Security First: Run security assessments regularly
- Optimize Continuously: Act on cost and performance recommendations
Operational Excellence Guidelines
Cost Optimization
- Tag Everything: Use consistent cost allocation tags
- Review Monthly: Analyze spending trends and anomalies
- Right-size: Match resources to actual usage
- Automate: Use auto-scaling and scheduling
- Monitor Budgets: Set alerts for cost overruns
Monitoring and Alerting
- Critical Metrics: Alert on business-critical metrics
- Noise Reduction: Fine-tune thresholds to reduce false positives
- Actionable Alerts: Ensure alerts have clear remediation steps
- Dashboard Visibility: Create dashboards for key stakeholders
- Log Retention: Balance cost and compliance needs
Security and Compliance
- Least Privilege: Grant minimum required permissions
- Audit Regularly: Review CloudTrail logs for anomalies
- Encrypt Data: Use encryption at rest and in transit
- Assess Continuously: Run security assessments frequently
- Incident Response: Have procedures for security events
Additional Resources
For detailed operational patterns and best practices, refer to the comprehensive reference:
File: references/operations-patterns.md
This reference includes:
- Cost optimization strategies
- Monitoring and alerting patterns
- Observability best practices
- Security and compliance guidelines
- Troubleshooting workflows
CloudWatch Alarms Reference
File: references/cloudwatch-alarms.md
Common alarm configurations for:
- Lambda functions
- EC2 instances
- RDS databases
- DynamoDB tables
- API Gateway
- ECS services
- Application Load Balancers
Source
git clone https://github.com/zxkane/aws-skills/blob/main/plugins/aws-cost-ops/skills/aws-cost-operations/SKILL.mdView on GitHub Overview
This skill provides comprehensive guidance for AWS cost optimization, monitoring, observability, and operational excellence using integrated MCP servers. It bundles seven MCP-enabled servers to analyze billing, estimate costs, monitor performance, and audit security activities, helping teams optimize spend while maintaining governance.
How This Skill Works
The skill orchestrates seven MCP servers automatically configured with the plugin to deliver real-time billing data, cost estimates, and observability insights. It requires AWS MCP tools for accurate information; if MCP tools are unavailable, it guides you through configuring aws-mcp-setup and choosing between a full AWS MCP Server or a documentation-based MCP.
When to Use It
- Before deploying new resources to estimate costs and compare regional pricing using the AWS Pricing MCP Server.
- Ongoing cost optimization with real-time spend insights, budgeting, and allocation tracking via the AWS Billing and Cost Management MCP Server.
- Detailed cost analysis and reporting to identify anomalies and forecast future costs with the AWS Cost Explorer MCP Server.
- Observability and performance monitoring with CloudWatch dashboards, alarms, and logs via the Amazon CloudWatch MCP Server.
- Security auditing and API activity investigation using the AWS CloudTrail MCP Server.
Quick Start
- Step 1: Ensure AWS MCP tooling is available; if not, run aws-mcp-setup to configure MCP servers.
- Step 2: Enable the MCP servers you need: AWS Billing and Cost Management, AWS Pricing, AWS Cost Explorer, Amazon CloudWatch, Amazon CloudWatch Application Signals, AWS Managed Prometheus, and AWS CloudTrail.
- Step 3: Run your first query to see current spend, set a budget, and configure a basic dashboard.
Best Practices
- Verify AWS MCP tool availability and run prechecks (eg, identity verification with aws sts get-caller-identity) before querying MCP data.
- Use cost allocation tags and budgets in the Billing MCP to monitor spend by project or team.
- Leverage Cost Explorer MCP for historical spending analysis and to generate actionable optimization recommendations.
- Set up CloudWatch MCP dashboards and alarms to monitor resource utilization and detect anomalies early.
- Use the CloudTrail MCP Server to audit API activity and review security-related changes and access patterns.
Example Use Cases
- View current AWS spending and trends, monitor budget utilization with the AWS Billing and Cost Management MCP Server.
- Pre-deployment cost estimation and region pricing comparison using the AWS Pricing MCP Server to inform a new service rollout.
- Create detailed cost reports and identify anomalies with the AWS Cost Explorer MCP Server to optimize spending.
- Build and analyze CloudWatch dashboards and alarms with the Amazon CloudWatch MCP Server to improve observability.
- Investigate security incidents by analyzing AWS API activity with the AWS CloudTrail MCP Server.