https://github.com/fredlackey/paas-query-db
Query cloud API's and store the results in a database for later retrieval and historical analysis.
https://github.com/fredlackey/paas-query-db
Last synced: about 2 months ago
JSON representation
Query cloud API's and store the results in a database for later retrieval and historical analysis.
- Host: GitHub
- URL: https://github.com/fredlackey/paas-query-db
- Owner: FredLackey
- Created: 2025-02-11T12:40:16.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-12T14:36:54.000Z (3 months ago)
- Last Synced: 2025-02-12T14:45:07.924Z (3 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PaaS Provider Query API
A streamlined API service for executing and tracking cloud provider commands across AWS GovCloud, AWS Commercial, Azure, and Google Cloud Platform.
## Overview
This service provides a unified interface for executing cloud provider commands while handling:
- Command execution tracking
- Rate limiting
- Account information caching
- Execution history
- Cross-provider compatibility## Quick Start
1. Install dependencies with: `npm install`
2. Configure environment:
- Copy `.env.example` to `.env.local`
- Update with your settings3. Start the service:
- Development: `npm run dev`
- Production: `npm start`## API Endpoints & Workflows
### 1. Execute Cloud Commands
**Endpoint:** POST `/execute`Execute cloud provider commands and store their results. Send a POST request with:
- accessKey
- secretKey
- providerName (e.g., "AWS GovCloud")
- region (e.g., "us-gov-west-1")
- command (e.g., "ec2 describeInstances")Features:
- Prevents duplicate commands
- Stores execution results
- Supports AWS, Azure, and GCP
- Returns results and timing### 2. Check Last Execution
**Endpoint:** GET `/lastExecution`Query parameters:
- accessKey
- command
- region
- providerNameReturns:
- Last successful execution details
- Execution time and results
- Command output### 3. View Execution History
**Endpoint:** GET `/executionHistory`Query parameters:
- accessKey
- command
- region
- providerName
- startDate (optional, ISO format)
- endDate (optional, ISO format)
- limit (optional, default 100)Returns execution history within specified date range.
### 4. Retrieve Specific Executions
**Endpoint:** POST `/executionsByDates`Request body:
- accessKey
- command
- region
- providerName
- dates (array of ISO format dates)Retrieves full execution details for specific dates.
## Supported Commands
### AWS Services
- API Gateway: REST and WebSocket API management
- CloudFormation: Infrastructure as code
- CloudFront: Content delivery and distribution
- CloudTrail: Account activity and API usage tracking
- CloudWatch: Metrics, monitoring, and logging
- Config: Resource inventory and configuration history
- Cost Explorer: Cost and usage reporting
- DynamoDB: NoSQL database operations
- EC2: Instance management and queries
- ECS: Container orchestration service
- EFS: Elastic File System operations
- EKS: Managed Kubernetes service
- Elastic Load Balancing: Load balancer management
- ElastiCache: In-memory caching service
- FSx: Managed file systems
- Glacier: Long-term data archival
- GuardDuty: Threat detection monitoring
- IAM: User and role management
- Lambda: Function operations
- Organizations: Account organization management
- RDS: Relational database operations
- S3: Bucket and object operations
- Security Hub: Security findings management
- Service Quotas: Service limits and quotas
- STS: Security token and identity operations### Azure Services
- Compute Management: Virtual machine and scale set operations
- Monitor: Metrics, alerts, and diagnostic settings
- Network: Virtual networks, load balancers, and connectivity
- Key Vault: Secure secret storage and management
- Storage: Blob storage and data management### Google Cloud Platform
- Compute Engine: Virtual machine and infrastructure management
- Cloud Storage: Object storage and data management
- BigQuery: Data warehouse and analytics
- Cloud Monitoring: Metrics, monitoring, and alerting
- Cloud Functions: Serverless compute platform## Error Handling
Common error scenarios:
- Invalid credentials
- Missing required parameters
- Rate limiting
- Service unavailability
- Command execution failuresEach error response includes:
- Error code
- Detailed message
- Suggested resolution## Benefits
- **Unified Interface**: One API for all cloud providers
- **Smart Caching**: Reduces API calls to cloud providers
- **Execution Tracking**: Prevents duplicate commands
- **History**: Maintains detailed execution records
- **Rate Limiting**: Protects your cloud provider quotas## Questions?
I'd love to help! Feel free to reach out:
Fred Lackey
Email: [email protected]
Blog: [FredLackey.com](https://fredlackey.com)---
*Built with ❤️ for the cloud community*