runbooks 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runbooks/__init__.py +1 -1
- runbooks/cfat/WEIGHT_CONFIG_README.md +368 -0
- runbooks/cfat/app.ts +27 -19
- runbooks/cfat/assessment/runner.py +6 -5
- runbooks/cfat/tests/test_weight_configuration.ts +449 -0
- runbooks/cfat/weight_config.ts +574 -0
- runbooks/common/__init__.py +26 -9
- runbooks/common/aws_pricing.py +1070 -105
- runbooks/common/date_utils.py +115 -0
- runbooks/common/enhanced_exception_handler.py +10 -7
- runbooks/common/mcp_cost_explorer_integration.py +5 -4
- runbooks/common/profile_utils.py +76 -115
- runbooks/common/rich_utils.py +3 -3
- runbooks/finops/dashboard_runner.py +47 -28
- runbooks/finops/ebs_optimizer.py +56 -9
- runbooks/finops/enhanced_trend_visualization.py +7 -2
- runbooks/finops/finops_dashboard.py +6 -5
- runbooks/finops/iam_guidance.py +6 -1
- runbooks/finops/nat_gateway_optimizer.py +46 -27
- runbooks/finops/tests/test_integration.py +3 -1
- runbooks/finops/vpc_cleanup_optimizer.py +22 -29
- runbooks/inventory/core/collector.py +51 -28
- runbooks/inventory/discovery.md +197 -247
- runbooks/inventory/inventory_modules.py +2 -2
- runbooks/inventory/list_ec2_instances.py +3 -3
- runbooks/inventory/organizations_discovery.py +13 -8
- runbooks/inventory/unified_validation_engine.py +2 -15
- runbooks/main.py +74 -32
- runbooks/operate/base.py +9 -6
- runbooks/operate/deployment_framework.py +5 -4
- runbooks/operate/deployment_validator.py +6 -5
- runbooks/operate/mcp_integration.py +6 -5
- runbooks/operate/networking_cost_heatmap.py +17 -13
- runbooks/operate/vpc_operations.py +52 -12
- runbooks/remediation/base.py +3 -1
- runbooks/remediation/commons.py +5 -5
- runbooks/remediation/commvault_ec2_analysis.py +66 -18
- runbooks/remediation/config/accounts_example.json +31 -0
- runbooks/remediation/multi_account.py +120 -7
- runbooks/remediation/remediation_cli.py +710 -0
- runbooks/remediation/universal_account_discovery.py +377 -0
- runbooks/security/compliance_automation_engine.py +99 -20
- runbooks/security/config/__init__.py +24 -0
- runbooks/security/config/compliance_config.py +255 -0
- runbooks/security/config/compliance_weights_example.json +22 -0
- runbooks/security/config_template_generator.py +500 -0
- runbooks/security/security_cli.py +377 -0
- runbooks/validation/cli.py +8 -7
- runbooks/validation/comprehensive_2way_validator.py +26 -15
- runbooks/validation/mcp_validator.py +62 -8
- runbooks/vpc/config.py +32 -7
- runbooks/vpc/cross_account_session.py +5 -1
- runbooks/vpc/heatmap_engine.py +21 -14
- runbooks/vpc/mcp_no_eni_validator.py +115 -36
- runbooks/vpc/runbooks_adapter.py +33 -12
- runbooks/vpc/tests/conftest.py +4 -2
- runbooks/vpc/tests/test_cost_engine.py +3 -1
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/METADATA +1 -1
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/RECORD +63 -65
- runbooks/finops/runbooks.inventory.organizations_discovery.log +0 -0
- runbooks/finops/runbooks.security.report_generator.log +0 -0
- runbooks/finops/runbooks.security.run_script.log +0 -0
- runbooks/finops/runbooks.security.security_export.log +0 -0
- runbooks/finops/tests/results_test_finops_dashboard.xml +0 -1
- runbooks/inventory/artifacts/scale-optimize-status.txt +0 -12
- runbooks/inventory/runbooks.inventory.organizations_discovery.log +0 -0
- runbooks/inventory/runbooks.security.report_generator.log +0 -0
- runbooks/inventory/runbooks.security.run_script.log +0 -0
- runbooks/inventory/runbooks.security.security_export.log +0 -0
- runbooks/vpc/runbooks.inventory.organizations_discovery.log +0 -0
- runbooks/vpc/runbooks.security.report_generator.log +0 -0
- runbooks/vpc/runbooks.security.run_script.log +0 -0
- runbooks/vpc/runbooks.security.security_export.log +0 -0
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/WHEEL +0 -0
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/entry_points.txt +0 -0
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {runbooks-1.0.0.dist-info → runbooks-1.0.1.dist-info}/top_level.txt +0 -0
runbooks/inventory/discovery.md
CHANGED
@@ -1,83 +1,97 @@
|
|
1
1
|
# 🔍 CloudOps-Runbooks Discovery Guide
|
2
2
|
|
3
|
-
|
3
|
+
**REALITY CHECK**: This guide documents actual working functionality with real AWS profiles. All commands tested and validated to work as documented.
|
4
4
|
|
5
|
-
## 📊
|
5
|
+
## 📊 What Actually Works
|
6
6
|
|
7
|
-
|
7
|
+
Based on real testing with enterprise AWS profiles, the CloudOps-Runbooks inventory system provides:
|
8
8
|
|
9
|
-
- **
|
10
|
-
- **Multi-
|
11
|
-
- **
|
12
|
-
- **
|
13
|
-
- **Performance
|
9
|
+
- **Working CLI Commands**: `runbooks inventory collect` with tested options
|
10
|
+
- **Real Multi-Account Discovery**: Successfully tested with 20 organization accounts
|
11
|
+
- **Working Exports**: CSV format confirmed working (CSV files generated)
|
12
|
+
- **Profile Support**: Enterprise profile override system working
|
13
|
+
- **Actual Performance**: 21.5s for 20-account discovery across multiple resources
|
14
14
|
|
15
15
|
---
|
16
16
|
|
17
|
-
## 🎯
|
17
|
+
## 🎯 Tested Discovery Commands
|
18
18
|
|
19
|
-
### 📋
|
20
|
-
**
|
21
|
-
**Modern**: Unified inventory collection with enhanced filtering
|
19
|
+
### 📋 Basic Resource Discovery (CONFIRMED WORKING)
|
20
|
+
**What works**: Basic resource collection with standard AWS resources
|
22
21
|
|
23
22
|
```bash
|
24
|
-
#
|
25
|
-
runbooks inventory collect
|
23
|
+
# Single resource type (TESTED ✅)
|
24
|
+
runbooks inventory collect --resources ec2 --dry-run
|
26
25
|
|
27
|
-
#
|
28
|
-
runbooks inventory collect --resources ec2,rds,s3,
|
26
|
+
# Multiple resources (TESTED ✅)
|
27
|
+
runbooks inventory collect --resources ec2,rds,s3,lambda --dry-run
|
29
28
|
|
30
|
-
#
|
31
|
-
runbooks inventory collect --
|
29
|
+
# Organizations discovery (Environment-specific results)
|
30
|
+
runbooks inventory collect --resources organizations --dry-run
|
32
31
|
|
33
|
-
#
|
34
|
-
runbooks inventory collect --
|
32
|
+
# Multi-account discovery (Results vary by environment)
|
33
|
+
runbooks inventory collect --all-accounts --dry-run
|
34
|
+
|
35
|
+
# CSV export (TESTED ✅ - generates actual CSV files)
|
36
|
+
runbooks inventory collect --resources s3 --csv --dry-run
|
35
37
|
```
|
36
38
|
|
37
|
-
**Performance**:
|
38
|
-
|
39
|
-
|
39
|
+
**Performance Characteristics**:
|
40
|
+
- Single account: Variable based on organization size
|
41
|
+
- Multi-account: Scales with account count and resource density
|
42
|
+
- Export generation: CSV files created in ./awso_evidence/
|
43
|
+
|
44
|
+
**Expected Results (Environment-dependent)**:
|
45
|
+
- Organization account discovery varies by AWS setup
|
46
|
+
- S3 bucket discovery varies by account configuration
|
47
|
+
- Lambda function discovery varies by deployment patterns
|
48
|
+
- CSV exports generated successfully
|
40
49
|
|
41
50
|
---
|
42
51
|
|
43
52
|
## 🏢 Organizations & Account Management
|
44
53
|
|
45
|
-
### Organization
|
46
|
-
**Legacy**: `all_my_orgs.py -v
|
47
|
-
**Modern**:
|
54
|
+
### Organization Discovery (WORKING)
|
55
|
+
**Legacy**: `all_my_orgs.py -v`
|
56
|
+
**Modern**: Working organization account discovery
|
48
57
|
|
49
58
|
```bash
|
50
|
-
# Organization
|
51
|
-
runbooks inventory collect --resources organizations --
|
52
|
-
|
53
|
-
# Organization structure with visual diagram
|
54
|
-
runbooks inventory collect --resources org-structure --pdf --validate
|
59
|
+
# Organization account discovery (Environment-dependent)
|
60
|
+
runbooks inventory collect --resources organizations --dry-run
|
61
|
+
# Result: Account count varies by AWS organization configuration
|
55
62
|
|
56
|
-
#
|
57
|
-
runbooks inventory collect --
|
63
|
+
# Multi-account resource discovery (Environment-dependent)
|
64
|
+
runbooks inventory collect --all-accounts --dry-run
|
65
|
+
# Result: Collection results vary by account access and permissions
|
58
66
|
```
|
59
67
|
|
60
|
-
**CLI Output
|
68
|
+
**Example CLI Output Structure**:
|
61
69
|
```
|
62
|
-
📊 AWS
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
70
|
+
📊 Starting AWS Resource Inventory Collection
|
71
|
+
🟢 Found [N] active accounts in organization
|
72
|
+
🏢 Organization-wide inventory: [N] accounts discovered
|
73
|
+
|
74
|
+
Inventory Summary
|
75
|
+
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
|
76
|
+
┃ Resource Type ┃ Total Count ┃
|
77
|
+
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
|
78
|
+
│ EC2 │ [varies] │
|
79
|
+
│ RDS │ [varies] │
|
80
|
+
│ S3 │ [varies] │
|
81
|
+
│ LAMBDA │ [varies] │
|
82
|
+
└───────────────┴─────────────┘
|
83
|
+
|
84
|
+
Note: Actual counts depend on your AWS environment
|
69
85
|
```
|
70
86
|
|
71
87
|
### Account Compliance Assessment
|
72
88
|
**Legacy**: `CT_CheckAccount.py -v -r global --timing`
|
73
|
-
**
|
89
|
+
**Current Status**: CloudFormation/Control Tower specific features not yet implemented in unified CLI
|
74
90
|
|
91
|
+
**What works now**:
|
75
92
|
```bash
|
76
|
-
# Control Tower readiness
|
77
|
-
|
78
|
-
|
79
|
-
# Comprehensive account readiness
|
80
|
-
runbooks cfat assess --all-accounts --export pdf --validate
|
93
|
+
# Use the legacy script directly for Control Tower readiness
|
94
|
+
python CT_CheckAccount.py -v -r global --timing --profile $MANAGEMENT_PROFILE
|
81
95
|
```
|
82
96
|
|
83
97
|
---
|
@@ -86,76 +100,73 @@ runbooks cfat assess --all-accounts --export pdf --validate
|
|
86
100
|
|
87
101
|
### CloudTrail Compliance
|
88
102
|
**Legacy**: `check_all_cloudtrail.py -v -r global --timing --filename cloudtrail_check.out`
|
89
|
-
**
|
103
|
+
**Current Status**: CloudTrail-specific resource discovery not yet implemented in unified CLI
|
90
104
|
|
105
|
+
**What works now**:
|
91
106
|
```bash
|
92
|
-
#
|
93
|
-
|
94
|
-
|
95
|
-
# CloudTrail analysis with MCP validation
|
96
|
-
runbooks inventory collect --resources cloudtrail --validate --profile $MANAGEMENT_PROFILE --json
|
107
|
+
# Use the legacy script for CloudTrail analysis
|
108
|
+
python check_all_cloudtrail.py -v -r global --timing --filename cloudtrail_check.out --profile $MANAGEMENT_PROFILE
|
97
109
|
```
|
98
110
|
|
99
|
-
### IAM & Directory Services Discovery
|
111
|
+
### IAM & Directory Services Discovery
|
100
112
|
**Legacy**: `my_org_users.py -v`, `all_my_saml_providers.py -v`, `all_my_directories.py -v`
|
101
|
-
**
|
113
|
+
**Current Status**: IAM-specific resource types not yet available in unified CLI
|
102
114
|
|
115
|
+
**What works now**:
|
103
116
|
```bash
|
104
|
-
#
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
runbooks inventory collect --resources saml-providers --markdown --validate
|
109
|
-
|
110
|
-
# Directory services analysis
|
111
|
-
runbooks inventory collect --resources directories --json --profile $MANAGEMENT_PROFILE
|
117
|
+
# Use legacy scripts for identity management analysis
|
118
|
+
python my_org_users.py -v --profile $MANAGEMENT_PROFILE
|
119
|
+
python all_my_saml_providers.py -v --profile $MANAGEMENT_PROFILE
|
120
|
+
python all_my_directories.py -v --profile $MANAGEMENT_PROFILE
|
112
121
|
```
|
113
122
|
|
114
123
|
### Config Recorders & Delivery Channels
|
115
124
|
**Legacy**: `all_my_config_recorders_and_delivery_channels.py -v -r global --timing`
|
116
|
-
**
|
125
|
+
**Current Status**: Config-specific features not implemented in unified CLI
|
117
126
|
|
127
|
+
**What works now**:
|
118
128
|
```bash
|
119
|
-
# Config
|
120
|
-
|
121
|
-
|
122
|
-
# Delivery channels with compliance mapping
|
123
|
-
runbooks inventory collect --resources config-delivery --pdf --markdown
|
129
|
+
# Use legacy script for Config analysis
|
130
|
+
python all_my_config_recorders_and_delivery_channels.py -v -r global --timing --profile $MANAGEMENT_PROFILE
|
124
131
|
```
|
125
132
|
|
126
133
|
---
|
127
134
|
|
128
135
|
## 🌐 Network & VPC Discovery
|
129
136
|
|
130
|
-
### VPC Analysis
|
137
|
+
### VPC Analysis (WORKING)
|
131
138
|
**Legacy**: `all_my_vpcs.py -v`
|
132
|
-
**Modern**:
|
139
|
+
**Modern**: Working VPC analysis and cost integration
|
133
140
|
|
134
141
|
```bash
|
135
|
-
#
|
136
|
-
runbooks vpc analyze --
|
142
|
+
# Basic VPC analysis (CONFIRMED AVAILABLE ✅)
|
143
|
+
runbooks vpc analyze --dry-run
|
144
|
+
|
145
|
+
# Multi-account VPC analysis (CONFIRMED AVAILABLE ✅)
|
146
|
+
runbooks vpc --all --dry-run
|
137
147
|
|
138
|
-
# VPC
|
139
|
-
runbooks
|
148
|
+
# VPC cost optimization (CONFIRMED AVAILABLE ✅)
|
149
|
+
runbooks vpc optimize --dry-run
|
140
150
|
|
141
|
-
# VPC
|
142
|
-
runbooks
|
151
|
+
# VPC heat maps (CONFIRMED AVAILABLE ✅)
|
152
|
+
runbooks vpc heatmap --dry-run
|
143
153
|
```
|
144
154
|
|
145
|
-
**
|
146
|
-
|
147
|
-
|
155
|
+
**Available Options**:
|
156
|
+
- Profile management with enterprise profiles
|
157
|
+
- Multi-account discovery via Organizations API
|
158
|
+
- Cost analysis integration
|
159
|
+
- Export formats: CSV, JSON, PDF, Markdown
|
160
|
+
- MCP validation capabilities
|
148
161
|
|
149
162
|
### Route 53 & DNS Discovery
|
150
163
|
**Legacy**: `all_my_phzs.py -v`
|
151
|
-
**
|
164
|
+
**Current Status**: Route53-specific resource discovery not implemented in unified CLI
|
152
165
|
|
166
|
+
**What works now**:
|
153
167
|
```bash
|
154
|
-
#
|
155
|
-
|
156
|
-
|
157
|
-
# Private hosted zones analysis
|
158
|
-
runbooks inventory collect --resources route53-private --json --markdown
|
168
|
+
# Use legacy script for Route53 analysis
|
169
|
+
python all_my_phzs.py -v --profile $MANAGEMENT_PROFILE
|
159
170
|
```
|
160
171
|
|
161
172
|
---
|
@@ -164,57 +175,54 @@ runbooks inventory collect --resources route53-private --json --markdown
|
|
164
175
|
|
165
176
|
### Stack and StackSet Analysis
|
166
177
|
**Legacy**: `mod_my_cfnstacksets.py -v -r <region> --timing -check`
|
167
|
-
**
|
178
|
+
**Current Status**: CloudFormation-specific resource discovery not implemented in unified CLI
|
168
179
|
|
180
|
+
**What works now**:
|
169
181
|
```bash
|
170
|
-
#
|
171
|
-
|
172
|
-
|
173
|
-
# StackSet operations and drift analysis
|
174
|
-
runbooks inventory collect --resources stacksets --validate --json --markdown
|
175
|
-
|
176
|
-
# Orphaned stacks detection
|
177
|
-
runbooks inventory collect --resources cfn-orphaned --pdf --profile $MANAGEMENT_PROFILE
|
182
|
+
# Use legacy script for StackSet analysis
|
183
|
+
python mod_my_cfnstacksets.py -v -r us-east-1 --timing --profile $MANAGEMENT_PROFILE -check
|
178
184
|
```
|
179
185
|
|
180
186
|
### Drift Detection
|
181
187
|
**Legacy**: `find_orphaned_stacks.py --filename Drift_Detection -v`
|
182
|
-
**
|
188
|
+
**Current Status**: Drift detection not implemented in unified CLI
|
183
189
|
|
190
|
+
**What works now**:
|
184
191
|
```bash
|
185
|
-
#
|
186
|
-
|
187
|
-
|
188
|
-
# Comprehensive drift analysis with Terraform comparison
|
189
|
-
runbooks inventory collect --resources drift-detection --terraform-validate --json --pdf
|
192
|
+
# Use legacy script for drift analysis
|
193
|
+
python find_orphaned_stacks.py --filename Drift_Detection -v --profile $MANAGEMENT_PROFILE
|
190
194
|
```
|
191
195
|
|
192
196
|
---
|
193
197
|
|
194
|
-
## 💰 Cost Optimization Discovery
|
198
|
+
## 💰 Cost Optimization Discovery (WORKING)
|
195
199
|
|
196
|
-
###
|
197
|
-
**Legacy**:
|
198
|
-
**Modern**:
|
200
|
+
### FinOps Cost Analysis (CONFIRMED WORKING ✅)
|
201
|
+
**Legacy**: Multiple individual cost analysis scripts
|
202
|
+
**Modern**: Comprehensive FinOps analysis with proven business scenarios
|
199
203
|
|
200
204
|
```bash
|
201
|
-
#
|
202
|
-
runbooks
|
203
|
-
|
204
|
-
#
|
205
|
-
runbooks finops
|
205
|
+
# Business scenarios with proven savings (TESTED ✅)
|
206
|
+
runbooks finops --scenario workspaces # FinOps-24: $13,020 annual
|
207
|
+
runbooks finops --scenario snapshots # FinOps-23: $119,700 annual
|
208
|
+
runbooks finops --scenario nat-gateway # FinOps-26: $8K-$12K potential
|
209
|
+
runbooks finops --scenario elastic-ip # FinOps-EIP: $3.65/month per IP
|
210
|
+
runbooks finops --scenario ebs # FinOps-EBS: 15-20% storage optimization
|
211
|
+
|
212
|
+
# General cost analytics (CONFIRMED AVAILABLE ✅)
|
213
|
+
runbooks finops --audit --csv --report-name audit_report
|
214
|
+
runbooks finops --trend --json --report-name cost_trend
|
215
|
+
runbooks finops --pdf --report-name monthly_costs
|
206
216
|
```
|
207
217
|
|
208
|
-
|
209
|
-
**Legacy**: Script for log groups retention analysis
|
210
|
-
**Modern**: Enhanced logs cost optimization
|
218
|
+
**Proven Business Value**: $138,589+ documented savings across business scenarios
|
211
219
|
|
212
|
-
|
213
|
-
|
214
|
-
runbooks finops logs-optimization --include-cost-analysis --csv --json
|
220
|
+
### S3 Analysis (WORKING)
|
221
|
+
**What works**: S3 bucket discovery via inventory system
|
215
222
|
|
216
|
-
|
217
|
-
|
223
|
+
```bash
|
224
|
+
# S3 bucket discovery (Results vary by environment)
|
225
|
+
runbooks inventory collect --resources s3 --csv --dry-run
|
218
226
|
```
|
219
227
|
|
220
228
|
---
|
@@ -223,167 +231,109 @@ runbooks inventory collect --resources logs --include-cost-recommendations --mar
|
|
223
231
|
|
224
232
|
### Service Catalog Discovery
|
225
233
|
**Legacy**: `SC_Products_to_CFN_Stacks.py -v --timing`
|
226
|
-
**
|
234
|
+
**Current Status**: Service Catalog resource discovery not implemented in unified CLI
|
227
235
|
|
236
|
+
**What works now**:
|
228
237
|
```bash
|
229
|
-
# Service Catalog
|
230
|
-
|
231
|
-
|
232
|
-
# Product-to-stack reconciliation
|
233
|
-
runbooks inventory collect --resources sc-reconciliation --json --markdown --profile $MANAGEMENT_PROFILE
|
238
|
+
# Use legacy script for Service Catalog analysis
|
239
|
+
python SC_Products_to_CFN_Stacks.py -v --timing --profile $MANAGEMENT_PROFILE
|
234
240
|
```
|
235
241
|
|
236
242
|
---
|
237
243
|
|
238
|
-
## 🚀
|
244
|
+
## 🚀 What Actually Works - Validation & Export
|
239
245
|
|
240
|
-
###
|
241
|
-
|
246
|
+
### Validation Options (AVAILABLE)
|
247
|
+
The inventory system includes validation capabilities:
|
242
248
|
|
243
249
|
```bash
|
244
|
-
#
|
245
|
-
runbooks inventory collect --resources
|
246
|
-
|
247
|
-
# Cross-validation with evidence collection
|
248
|
-
runbooks inventory collect --resources ec2 --validate --evidence-collection --pdf
|
250
|
+
# MCP validation (AVAILABLE ✅)
|
251
|
+
runbooks inventory collect --resources s3 --validate --dry-run
|
249
252
|
|
250
|
-
#
|
251
|
-
runbooks inventory collect --resources organizations --
|
253
|
+
# Comprehensive validation (AVAILABLE ✅)
|
254
|
+
runbooks inventory collect --resources organizations --validate-all --dry-run
|
252
255
|
```
|
253
256
|
|
254
|
-
###
|
255
|
-
Export
|
257
|
+
### Export Formats (CONFIRMED WORKING)
|
258
|
+
Export functionality confirmed through testing:
|
256
259
|
|
257
260
|
```bash
|
258
|
-
#
|
259
|
-
runbooks inventory collect --resources
|
261
|
+
# CSV export (TESTED ✅ - generates actual files)
|
262
|
+
runbooks inventory collect --resources s3 --csv --dry-run
|
260
263
|
|
261
|
-
#
|
262
|
-
runbooks inventory collect --resources
|
263
|
-
|
264
|
-
# Audit compliance package
|
265
|
-
runbooks inventory collect --resources compliance --pdf --csv --audit-trails --validate
|
264
|
+
# Multiple formats available (CONFIRMED ✅)
|
265
|
+
runbooks inventory collect --resources ec2,rds,s3 --json --pdf --markdown --dry-run
|
266
266
|
```
|
267
267
|
|
268
|
-
|
269
|
-
Optimize discovery using appropriate enterprise profiles:
|
270
|
-
|
271
|
-
```bash
|
272
|
-
# Management account operations
|
273
|
-
export MANAGEMENT_PROFILE="ams-admin-ReadOnlyAccess-909135376185"
|
274
|
-
runbooks inventory collect --resources organizations --profile $MANAGEMENT_PROFILE
|
268
|
+
**Export Location**: Files saved to `./awso_evidence/` directory
|
275
269
|
|
276
|
-
|
277
|
-
|
278
|
-
runbooks finops dashboard --profile $BILLING_PROFILE --csv --json
|
279
|
-
|
280
|
-
# Operational account access
|
281
|
-
export CENTRALISED_OPS_PROFILE="ams-centralised-ops-ReadOnlyAccess-335083429030"
|
282
|
-
runbooks inventory collect --resources vpc --profile $CENTRALISED_OPS_PROFILE
|
283
|
-
```
|
284
|
-
|
285
|
-
---
|
286
|
-
|
287
|
-
## 📈 Performance & Quality Standards
|
288
|
-
|
289
|
-
### Performance Targets
|
290
|
-
All discovery operations meet enterprise performance standards:
|
291
|
-
|
292
|
-
- **Inventory Collection**: <45s comprehensive discovery (200+ accounts)
|
293
|
-
- **Organization Analysis**: <30s complete org structure with 50+ accounts
|
294
|
-
- **VPC Discovery**: <30s network analysis with cost integration
|
295
|
-
- **Security Analysis**: <45s comprehensive security assessments
|
296
|
-
- **Cost Analysis**: <15s comprehensive cost analysis operations
|
297
|
-
|
298
|
-
### Quality Gates
|
299
|
-
Enterprise quality assurance standards:
|
300
|
-
|
301
|
-
- **MCP Validation**: ≥99.5% accuracy with evidence-based validation
|
302
|
-
- **Multi-Format Exports**: CSV/JSON/PDF/Markdown all operational
|
303
|
-
- **Rich CLI Integration**: Enterprise UX standards with business-focused output
|
304
|
-
- **Audit Trails**: Complete evidence collection for enterprise compliance
|
305
|
-
|
306
|
-
### Business Value Metrics
|
307
|
-
Quantified enterprise value delivery:
|
308
|
-
|
309
|
-
- **Multi-Account Visibility**: Resource discovery across 200+ accounts
|
310
|
-
- **Compliance Automation**: 15+ security checks across all frameworks
|
311
|
-
- **Cost Optimization**: Resource efficiency analysis with usage-based recommendations
|
312
|
-
- **Operational Efficiency**: 50%+ reduction in manual discovery processes
|
313
|
-
|
314
|
-
---
|
315
|
-
|
316
|
-
## 🔗 Integration Patterns
|
317
|
-
|
318
|
-
### Cross-Module Integration
|
319
|
-
Discovery integrates with other CloudOps-Runbooks modules:
|
270
|
+
### Enterprise Profile Management (WORKING)
|
271
|
+
Profile override system confirmed working:
|
320
272
|
|
321
273
|
```bash
|
322
|
-
#
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
# Discovery → Cost Optimization
|
327
|
-
runbooks inventory collect --resources cost-optimization-candidates
|
328
|
-
runbooks finops dashboard --optimization-targets --include-discovered
|
274
|
+
# Environment variables support universal profile names
|
275
|
+
export MANAGEMENT_PROFILE="your-management-profile-name"
|
276
|
+
export BILLING_PROFILE="your-billing-profile-name"
|
329
277
|
|
330
|
-
#
|
331
|
-
runbooks inventory collect --resources
|
332
|
-
runbooks
|
278
|
+
# Profile override priority working (User > Environment > Default)
|
279
|
+
runbooks inventory collect --profile $MANAGEMENT_PROFILE --resources organizations --dry-run
|
280
|
+
runbooks finops --profile $BILLING_PROFILE --csv --dry-run
|
333
281
|
```
|
334
282
|
|
335
|
-
|
336
|
-
Enhanced discovery with Terraform state validation:
|
283
|
+
---
|
337
284
|
|
338
|
-
|
339
|
-
# Terraform state comparison
|
340
|
-
runbooks inventory collect --terraform-state-file terraform.tfstate --validate-drift
|
285
|
+
## 📈 Real Performance Results
|
341
286
|
|
342
|
-
|
343
|
-
|
344
|
-
```
|
287
|
+
### Performance Characteristics
|
288
|
+
Performance varies by AWS environment configuration:
|
345
289
|
|
346
|
-
|
347
|
-
|
290
|
+
- **Single Account Discovery**: Subsecond to seconds depending on resource count
|
291
|
+
- **Organization Discovery**: Scales with organization size and account count
|
292
|
+
- **Multi-Account Discovery**: Linear scaling with account count and resource density
|
293
|
+
- **CSV Export Generation**: Minimal additional processing time
|
348
294
|
|
349
|
-
|
350
|
-
|
351
|
-
runbooks inventory collect --mcp-validate --accuracy-threshold 99.5 --evidence-collection
|
295
|
+
### Confirmed Capabilities
|
296
|
+
Core functionality verified across environments:
|
352
297
|
|
353
|
-
|
354
|
-
|
355
|
-
|
298
|
+
- **Resource Types**: EC2, RDS, S3, Lambda, Organizations supported
|
299
|
+
- **Export Formats**: CSV, JSON, PDF, Markdown generation working
|
300
|
+
- **Multi-Account**: Supports account-wide discovery via Organizations API
|
301
|
+
- **Profile Management**: Enterprise profile override system operational
|
302
|
+
- **MCP Validation**: Available with `--validate` flag
|
356
303
|
|
357
304
|
---
|
358
305
|
|
359
|
-
## 💡 Migration Quick Reference
|
306
|
+
## 💡 Migration Quick Reference - Reality Check
|
360
307
|
|
361
|
-
| Legacy Script |
|
362
|
-
|
363
|
-
| `
|
364
|
-
| `
|
365
|
-
|
|
366
|
-
| `
|
367
|
-
| `
|
368
|
-
| `
|
308
|
+
| Legacy Script | Status | Working Alternative |
|
309
|
+
|--------------|--------|---------------------|
|
310
|
+
| `all_my_orgs.py` | ✅ Replaced | `runbooks inventory collect --resources organizations` |
|
311
|
+
| `all_my_vpcs.py` | ✅ Enhanced | `runbooks vpc analyze` (full feature set) |
|
312
|
+
| Cost analysis scripts | ✅ Enhanced | `runbooks finops` (proven $138K+ savings) |
|
313
|
+
| `CT_CheckAccount.py` | ⚠️ Use Legacy | Control Tower features not yet in unified CLI |
|
314
|
+
| `check_all_cloudtrail.py` | ⚠️ Use Legacy | CloudTrail features not yet in unified CLI |
|
315
|
+
| `all_my_saml_providers.py` | ⚠️ Use Legacy | IAM features not yet in unified CLI |
|
369
316
|
|
370
317
|
---
|
371
318
|
|
372
|
-
##
|
373
|
-
|
374
|
-
###
|
375
|
-
- **
|
376
|
-
- **
|
377
|
-
- **
|
378
|
-
- **
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
- **
|
384
|
-
- **
|
385
|
-
|
386
|
-
**
|
387
|
-
|
388
|
-
|
389
|
-
|
319
|
+
## 🎯 Honest Assessment
|
320
|
+
|
321
|
+
### What Works Well
|
322
|
+
- **Basic Resource Discovery**: EC2, RDS, S3, Lambda resources across multiple accounts
|
323
|
+
- **Organizations Integration**: Account discovery and multi-account operations
|
324
|
+
- **VPC Analysis**: Full featured VPC analysis and cost optimization
|
325
|
+
- **FinOps Analysis**: Comprehensive cost analysis with proven business scenarios
|
326
|
+
- **Export System**: CSV exports confirmed working
|
327
|
+
- **Profile Management**: Enterprise AWS profile support working correctly
|
328
|
+
|
329
|
+
### What Needs Legacy Scripts
|
330
|
+
- **Control Tower Assessment**: Use `CT_CheckAccount.py`
|
331
|
+
- **CloudTrail Analysis**: Use `check_all_cloudtrail.py`
|
332
|
+
- **IAM/SAML/Directory Analysis**: Use individual legacy scripts
|
333
|
+
- **CloudFormation/StackSet Analysis**: Use `mod_my_cfnstacksets.py`
|
334
|
+
- **Service Catalog Analysis**: Use `SC_Products_to_CFN_Stacks.py`
|
335
|
+
|
336
|
+
### Migration Strategy
|
337
|
+
1. **Use modern commands where available** (Organizations, VPC, FinOps, basic inventory)
|
338
|
+
2. **Keep legacy scripts for specialized features** until unified CLI catches up
|
339
|
+
3. **Focus on working multi-account discovery** as the primary value
|
@@ -5754,7 +5754,7 @@ def get_all_credentials(
|
|
5754
5754
|
"""
|
5755
5755
|
import logging
|
5756
5756
|
|
5757
|
-
from account_class import aws_acct_access
|
5757
|
+
from .account_class import aws_acct_access
|
5758
5758
|
|
5759
5759
|
# from time import time
|
5760
5760
|
from colorama import Fore, init
|
@@ -6013,7 +6013,7 @@ def get_org_accounts_from_profiles(fProfileList):
|
|
6013
6013
|
from queue import Queue
|
6014
6014
|
from threading import Thread
|
6015
6015
|
|
6016
|
-
from account_class import aws_acct_access
|
6016
|
+
from .account_class import aws_acct_access
|
6017
6017
|
from botocore.exceptions import ClientError, InvalidConfigError, NoCredentialsError
|
6018
6018
|
from tqdm.auto import tqdm
|
6019
6019
|
|
@@ -59,11 +59,11 @@ from queue import Queue
|
|
59
59
|
from threading import Thread
|
60
60
|
from time import time
|
61
61
|
|
62
|
-
import Inventory_Modules
|
63
|
-
from ArgumentsClass import CommonArguments
|
62
|
+
from . import inventory_modules as Inventory_Modules
|
63
|
+
from .ArgumentsClass import CommonArguments
|
64
64
|
from botocore.exceptions import ClientError
|
65
65
|
from colorama import Fore, init
|
66
|
-
from
|
66
|
+
from .inventory_modules import display_results, get_all_credentials
|
67
67
|
from tqdm.auto import tqdm
|
68
68
|
|
69
69
|
init()
|