A powerful, CloudShell-ready toolkit for AWS cost forecasting with automated QuickSight dashboard creation
Transform your AWS cost management with this comprehensive shell script toolkit that fetches cost forecast data, processes it efficiently, and creates beautiful QuickSight dashboards - all from AWS CloudShell!
🔮 Advanced Cost Forecasting
- Fetch forecasts for multiple AWS services simultaneously
- Support for all AWS Cost Explorer metrics (AMORTIZED_COST, BLENDED_COST, etc.)
- Parallel processing for faster data collection
- Configurable time periods (30, 90, 180, 365 days or custom)
📊 Automated Dashboard Creation
- One-click QuickSight dashboard generation
- Pre-built templates for cost analysis
- Interactive visualizations with drill-down capabilities
- Automated data refresh scheduling
☁️ CloudShell Optimized
- Zero installation required - runs directly in AWS CloudShell
- Built-in AWS CLI integration
- Intelligent error handling and recovery
- Progress indicators and colored output
🎯 Enterprise Ready
- Multi-account support
- Bulk data processing
- S3 integration for data storage
- Email reporting capabilities
- Log into your AWS Console
- Click the CloudShell icon (terminal) in the top navigation
- Wait for CloudShell to initialize
# Clone the repository
git clone https://github.com/NithinChandranR-AWS/aws-cost-forecast-toolkit.git
cd aws-cost-forecast-toolkit
# Make scripts executable
chmod +x scripts/*.sh
# Run the main forecast tool
./scripts/forecast-data-fetch.sh
The script will guide you through:
- ✅ Time period selection
- ✅ Metrics and dimensions selection
- ✅ S3 bucket configuration
- ✅ QuickSight dashboard creation
That's it! Your cost forecast data and dashboard will be ready in minutes.
✅ AWS Account with appropriate permissions
✅ AWS CloudShell access (included with AWS account)
✅ Cost Explorer enabled (free with AWS account)
✅ QuickSight subscription (optional, for dashboards)
✅ S3 bucket for data storage (optional)
Note: All tools (AWS CLI, jq, bash) are pre-installed in CloudShell!
- Monthly budget forecasting
- Quarterly cost projections
- Annual budget planning
- Service cost optimization
- Identify cost trends and anomalies
- Compare forecasted vs actual costs
- Track Reserved Instance utilization
- Monitor service-level spending
- Automated monthly cost reports
- Executive dashboard creation
- Stakeholder cost visibility
- Budget variance analysis
Script | Purpose | Usage |
---|---|---|
forecast-data-fetch.sh |
Main cost forecasting tool | ./scripts/forecast-data-fetch.sh |
quicksight-dashboard.sh |
Dashboard creation automation | ./scripts/quicksight-dashboard.sh |
setup.sh |
Environment setup and validation | ./scripts/setup.sh |
Dimension,Value,Metric,StartDate,EndDate,MeanValue,LowerBound,UpperBound
SERVICE,Amazon EC2,UNBLENDED_COST,2024-01-01,2024-01-02,125.50,120.00,131.00
SERVICE,Amazon S3,UNBLENDED_COST,2024-01-01,2024-01-02,45.25,42.00,48.50
SERVICE,Amazon RDS,UNBLENDED_COST,2024-01-01,2024-01-02,89.75,85.00,94.50
# Set up cross-account access
export AWS_PROFILE=production
./scripts/forecast-data-fetch.sh --account-id 123456789012
# Custom date range
./scripts/forecast-data-fetch.sh --start-date 2024-01-01 --end-date 2024-12-31
# Set up daily automated reports
./scripts/setup-automation.sh --schedule daily --email [email protected]
# Optional: Set default configuration
export FORECAST_DEFAULT_BUCKET="my-cost-data-bucket"
export FORECAST_DEFAULT_REGION="us-east-1"
export FORECAST_EMAIL_REPORTS="[email protected]"
Create config/user.conf
for persistent settings:
# Default settings
DEFAULT_BUCKET="my-cost-forecasts"
DEFAULT_REGION="us-east-1"
EMAIL_NOTIFICATIONS="true"
QUICKSIGHT_AUTO_CREATE="true"
❌ "AWS CLI not found"
# This shouldn't happen in CloudShell, but if it does:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install
❌ "Permission denied"
# Make scripts executable
chmod +x scripts/*.sh
❌ "Cost Explorer access denied"
- Ensure your IAM user/role has
ce:GetCostAndUsage
andce:GetCostForecast
permissions
❌ "QuickSight not available"
- QuickSight must be activated in your AWS account
- Ensure you have QuickSight permissions
We welcome contributions from the AWS community!
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature
) - ✅ Test your changes in CloudShell
- 📝 Commit your changes (
git commit -m 'Add amazing feature'
) - 🚀 Push to the branch (
git push origin feature/amazing-feature
) - 🎯 Open a Pull Request
# Clone your fork
git clone https://github.com/NithinChandranR-AWS/aws-cost-forecast-toolkit.git
cd aws-cost-forecast-toolkit
# Run tests
./tests/run-tests.sh
# Check script quality
shellcheck scripts/*.sh
- Multi-cloud support (Azure, GCP cost forecasting)
- Machine learning predictions (trend analysis)
- Slack/Teams integration (automated notifications)
- Terraform module (infrastructure as code)
- API Gateway wrapper (REST API access)
- Mobile dashboard (responsive QuickSight templates)
Special thanks to our contributors:
- 🌟 Top Contributors: [Will be updated as community grows]
- 🐛 Bug Hunters: [Community bug reporters]
- 📖 Documentation Heroes: [Documentation contributors]
- 💬 GitHub Discussions - Ask questions, share ideas
- 🐛 Report Issues - Found a bug? Let us know!
- 📧 Email Updates - Stay updated on releases
This project is licensed under the MIT License - see the LICENSE file for details.
- 📖 Check the documentation
- 🔍 Search existing issues
- 💬 Start a discussion
- 🐛 Create an issue
For enterprise support, training, or custom implementations:
- 💼 LinkedIn: Nithin Chandran R
- � GitHub: NithinChandranR-AWS
⭐ If this tool helps you save money on AWS, please give it a star! ⭐
Made with ❤️ for the AWS Community