cdk-factory 0.8.1__tar.gz → 0.8.2__tar.gz

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.

Potentially problematic release.


This version of cdk-factory might be problematic. Click here for more details.

Files changed (141) hide show
  1. cdk_factory-0.8.2/CHANGELOG_v0.8.1.md +148 -0
  2. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/PKG-INFO +1 -1
  3. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/pyproject.toml +1 -1
  4. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +30 -19
  5. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/json_loading_utility.py +55 -27
  6. cdk_factory-0.8.2/src/cdk_factory/version.py +1 -0
  7. cdk_factory-0.8.1/src/cdk_factory/version.py +0 -1
  8. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/.gitignore +0 -0
  9. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/.windsurfrules +0 -0
  10. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/GEEK_CAFE_FIX.md +0 -0
  11. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/LICENSE +0 -0
  12. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/README.md +0 -0
  13. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/archive/README.md +0 -0
  14. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/archive/migrate_to_enhanced_ssm.py +0 -0
  15. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/examples/separate-api-gateway/README.md +0 -0
  16. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/examples/separate-api-gateway/api-gateway-stack.json +0 -0
  17. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/examples/separate-api-gateway/config.json +0 -0
  18. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/examples/separate-api-gateway/lambda-stack.json +0 -0
  19. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/mypy.ini +0 -0
  20. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/publish_to_pypi.py +0 -0
  21. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/publish_to_pypi.sh +0 -0
  22. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/pysetup.py +0 -0
  23. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/pysetup.sh +0 -0
  24. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/requirements.dev.txt +0 -0
  25. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/requirements.tests.txt +0 -0
  26. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/requirements.txt +0 -0
  27. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/run-checks.sh +0 -0
  28. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/run-tests-clean-venv.sh +0 -0
  29. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/run-tests.sh +0 -0
  30. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/__init__.py +0 -0
  31. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/app.py +0 -0
  32. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/builds/README.md +0 -0
  33. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/cdk.json +0 -0
  34. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/commands/command_loader.py +0 -0
  35. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/base_config.py +0 -0
  36. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/cdk_config.py +0 -0
  37. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/deployment.py +0 -0
  38. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/deployment_wave.py +0 -0
  39. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/devops.py +0 -0
  40. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/enhanced_base_config.py +0 -0
  41. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/enhanced_ssm_config.py +0 -0
  42. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/management.py +0 -0
  43. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/pipeline.py +0 -0
  44. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/pipeline_stage.py +0 -0
  45. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/_resources.py +0 -0
  46. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/api_gateway.py +0 -0
  47. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/apigateway_route_config.py +0 -0
  48. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/auto_scaling.py +0 -0
  49. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/cloudfront.py +0 -0
  50. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/cloudwatch_widget.py +0 -0
  51. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/code_artifact.py +0 -0
  52. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/code_artifact_login.py +0 -0
  53. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/code_repository.py +0 -0
  54. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/cognito.py +0 -0
  55. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/docker.py +0 -0
  56. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/dynamodb.py +0 -0
  57. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/ecr.py +0 -0
  58. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/exisiting.py +0 -0
  59. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/lambda_function.py +0 -0
  60. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/lambda_layers.py +0 -0
  61. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/lambda_triggers.py +0 -0
  62. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/load_balancer.py +0 -0
  63. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/rds.py +0 -0
  64. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/resource_mapping.py +0 -0
  65. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/resource_naming.py +0 -0
  66. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/resource_types.py +0 -0
  67. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/route53.py +0 -0
  68. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/route53_hosted_zone.py +0 -0
  69. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/rum.py +0 -0
  70. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/s3.py +0 -0
  71. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/security_group.py +0 -0
  72. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/security_group_full_stack.py +0 -0
  73. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/sqs.py +0 -0
  74. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/resources/vpc.py +0 -0
  75. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/stack.py +0 -0
  76. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/configurations/workload.py +0 -0
  77. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +0 -0
  78. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/ecr/ecr_construct.py +0 -0
  79. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/lambdas/lambda_function_construct.py +0 -0
  80. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/lambdas/lambda_function_docker_construct.py +0 -0
  81. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/lambdas/lambda_function_role_construct.py +0 -0
  82. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/lambdas/policies/policy_docs.py +0 -0
  83. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/lambdas/policies/policy_statements.py +0 -0
  84. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/s3_buckets/s3_bucket_construct.py +0 -0
  85. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_destination_construct.py +0 -0
  86. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_source_construct.py +0 -0
  87. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/constructs/sqs/policies/sqs_policies.py +0 -0
  88. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/interfaces/istack.py +0 -0
  89. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/interfaces/live_ssm_resolver.py +0 -0
  90. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/interfaces/ssm_parameter_mixin.py +0 -0
  91. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/lambdas/health_handler.py +0 -0
  92. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/pipeline/pipeline_factory.py +0 -0
  93. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/pipeline/security/policies.py +0 -0
  94. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/pipeline/security/roles.py +0 -0
  95. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/pipeline/stage.py +0 -0
  96. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack/istack.py +0 -0
  97. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack/stack_factory.py +0 -0
  98. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack/stack_module_loader.py +0 -0
  99. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack/stack_module_registry.py +0 -0
  100. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack/stack_modules.py +0 -0
  101. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/__init__.py +0 -0
  102. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/api_gateway/api_gateway_stack.py +0 -0
  103. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/auto_scaling/__init__.py +0 -0
  104. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +0 -0
  105. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/aws_lambdas/lambda_stack.py +0 -0
  106. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/buckets/README.md +0 -0
  107. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/buckets/bucket_stack.py +0 -0
  108. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/code_artifact/code_artifact_stack.py +0 -0
  109. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/cognito/cognito_stack.py +0 -0
  110. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/dynamodb/dynamodb_stack.py +0 -0
  111. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/ecr/README.md +0 -0
  112. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/ecr/ecr_stack.py +0 -0
  113. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/load_balancer/__init__.py +0 -0
  114. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/load_balancer/load_balancer_stack.py +0 -0
  115. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/rds/__init__.py +0 -0
  116. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/rds/rds_stack.py +0 -0
  117. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/route53/__init__.py +0 -0
  118. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/route53/route53_stack.py +0 -0
  119. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/rum/__init__.py +0 -0
  120. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/rum/rum_stack.py +0 -0
  121. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/security_group/__init__.py +0 -0
  122. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/security_group/security_group_full_stack.py +0 -0
  123. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/security_group/security_group_stack.py +0 -0
  124. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/simple_queue_service/sqs_stack.py +0 -0
  125. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/stack_base.py +0 -0
  126. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/vpc/__init__.py +0 -0
  127. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/vpc/vpc_stack.py +0 -0
  128. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stack_library/websites/static_website_stack.py +0 -0
  129. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/stages/websites/static_website_stage.py +0 -0
  130. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/api_gateway_integration_utility.py +0 -0
  131. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/commandline_args.py +0 -0
  132. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/configuration_loader.py +0 -0
  133. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/docker_utilities.py +0 -0
  134. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/environment_services.py +0 -0
  135. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/file_operations.py +0 -0
  136. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/git_utilities.py +0 -0
  137. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/lambda_function_utilities.py +0 -0
  138. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utilities/os_execute.py +0 -0
  139. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/utils/api_gateway_utilities.py +0 -0
  140. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/cdk_factory/workload/workload_factory.py +0 -0
  141. {cdk_factory-0.8.1 → cdk_factory-0.8.2}/src/handlers/test/handler.py +0 -0
@@ -0,0 +1,148 @@
1
+ # CDK Factory v0.8.1 Release Notes
2
+
3
+ Released: 2025-10-09
4
+
5
+ ## Bug Fixes
6
+
7
+ ### 1. Fixed SSM Export Configuration Bug
8
+ **Issue**: Documentation showed incorrect pattern `"exports": {"enabled": true}` which caused `AttributeError: 'bool' object has no attribute 'startswith'`
9
+
10
+ **Fix**:
11
+ - Added type validation in `enhanced_ssm_config.py` to handle non-string values
12
+ - Updated documentation to show correct pattern: `"auto_export": true`
13
+ - Created comprehensive documentation in `docs/SSM_EXPORT_FIX.md`
14
+
15
+ **Impact**: Prevents crashes when using incorrect SSM export configuration
16
+
17
+ ### 2. Fixed Cognito User Pool SSM Import for API Gateway
18
+ **Issue**: API Gateway couldn't find Cognito User Pool ARN, causing `ValueError: User pool ID is required for API Gateway authorizer`
19
+
20
+ **Fix**:
21
+ - Enhanced SSM-based import pattern for `user_pool_arn`
22
+ - Created comprehensive guide in `docs/API_GATEWAY_COGNITO_SSM.md`
23
+ - Added auto-discovery support via `"user_pool_arn": "auto"`
24
+
25
+ **Impact**: Enables seamless cross-stack Cognito + API Gateway integration
26
+
27
+ ### 3. Fixed Authorizer Creation When Not Needed
28
+ **Issue**: API Gateway authorizer was created even when all routes were public (`authorization_type: "NONE"`), causing CDK validation error: `ValidationError: Authorizer must be attached to a RestApi`
29
+
30
+ **Fix**:
31
+ - Modified `_setup_cognito_authorizer()` to only create authorizer when at least one route requires it
32
+ - Added `cognito_configured` flag to maintain security validation context
33
+ - Security warnings still emitted for public endpoints when Cognito is available
34
+
35
+ **Impact**:
36
+ - Prevents CDK synthesis errors for public-only APIs
37
+ - Maintains security validation without creating unused resources
38
+ - Reduces AWS resource overhead
39
+
40
+ ### 4. Removed Deprecated SSM Parameter Types
41
+ **Issue**: Using deprecated `ssm.ParameterType.STRING`, `ssm.ParameterType.STRING_LIST`, and `type` parameter caused AWS CDK deprecation warnings
42
+
43
+ **Fix**:
44
+ - Replaced deprecated `ParameterType` enum with appropriate CDK constructs:
45
+ - `StringParameter` for regular strings (no `type` parameter needed)
46
+ - `StringListParameter` for string lists
47
+ - `CfnParameter` with `type="SecureString"` for secure strings
48
+ - Updated `enhanced_ssm_parameter_mixin.py` to use CDK v2 best practices
49
+
50
+ **Impact**:
51
+ - Eliminates deprecation warnings
52
+ - Future-proofs code for CDK v3
53
+ - Follows AWS CDK v2 best practices
54
+
55
+ ## Test Coverage
56
+
57
+ - **153 tests passing** ✅
58
+ - New test coverage:
59
+ - `test_api_gateway_export_config.py` (6 tests)
60
+ - `test_api_gateway_authorizer_ssm_integration.py` (5 tests)
61
+ - `test_cross_stack_ssm_integration.py` (3 tests)
62
+ - `test_api_gateway_enhanced_authorization_validation.py` (6 tests)
63
+
64
+ ## Documentation Added
65
+
66
+ 1. **docs/SSM_EXPORT_FIX.md** - SSM export configuration bug fix guide
67
+ 2. **docs/API_GATEWAY_COGNITO_SSM.md** - Comprehensive Cognito + API Gateway SSM integration guide
68
+ 3. **GEEK_CAFE_FIX.md** - Quick fix guide for geek-cafe project (example usage)
69
+
70
+ ## Breaking Changes
71
+
72
+ None - all changes are backward compatible
73
+
74
+ ## Migration Guide
75
+
76
+ ### If you're using the old export pattern:
77
+
78
+ **Before (v0.8.0 - incorrect docs):**
79
+ ```json
80
+ {
81
+ "ssm": {
82
+ "enabled": true,
83
+ "exports": {
84
+ "enabled": true // ❌ Wrong
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ **After (v0.8.1):**
91
+ ```json
92
+ {
93
+ "ssm": {
94
+ "enabled": true,
95
+ "auto_export": true // ✅ Correct
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### If you're getting Cognito User Pool errors:
101
+
102
+ Add to your API Gateway stack config:
103
+ ```json
104
+ {
105
+ "api_gateway": {
106
+ "ssm": {
107
+ "imports": {
108
+ "user_pool_arn": "auto" // ✅ Add this
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### If you have public-only API routes:
116
+
117
+ Your config should work without changes. The authorizer will only be created if needed:
118
+ ```json
119
+ {
120
+ "cognito_authorizer": {
121
+ "authorizer_name": "my-authorizer" // Config present but not used
122
+ },
123
+ "routes": [
124
+ {
125
+ "path": "/public",
126
+ "method": "GET",
127
+ "authorization_type": "NONE", // ✅ Authorizer won't be created
128
+ "allow_public_override": true
129
+ }
130
+ ]
131
+ }
132
+ ```
133
+
134
+ ## Deployment Flow (v0.8.1+)
135
+
136
+ ```
137
+ 1. Cognito Stack → Exports user_pool_arn to SSM
138
+ 2. Lambda Stack → Exports Lambda ARNs to SSM
139
+ 3. API Gateway Stack → Imports both, creates authorizer only if needed
140
+ ```
141
+
142
+ ## Known Issues
143
+
144
+ None
145
+
146
+ ## Contributors
147
+
148
+ - Eric Wilson (@geekcafe)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: CDK Factory. A QuickStarter and best practices setup for CDK projects
5
5
  Author-email: Eric Wilson <eric.wilson@geekcafe.com>
6
6
  License: MIT License
@@ -33,7 +33,7 @@ markers = [
33
33
  [project]
34
34
 
35
35
  name = "cdk_factory"
36
- version = "0.8.1"
36
+ version = "0.8.2"
37
37
  authors = [
38
38
  { name="Eric Wilson", email="eric.wilson@geekcafe.com" }
39
39
  ]
@@ -142,28 +142,39 @@ class EnhancedSsmParameterMixin:
142
142
  Returns:
143
143
  Created SSM parameter
144
144
  """
145
- # Handle different value types
146
- if isinstance(value, list):
147
- string_value = ",".join(str(v) for v in value)
148
- cdk_param_type = ssm.ParameterType.STRING_LIST
149
- elif param_type == "SecureString":
150
- string_value = str(value)
151
- cdk_param_type = ssm.ParameterType.SECURE_STRING
152
- else:
153
- string_value = str(value)
154
- cdk_param_type = ssm.ParameterType.STRING
155
-
156
145
  # Generate a unique construct ID from the path
157
146
  construct_id = f"ssm-param-{path.replace('/', '-').replace('_', '-')}"
158
147
 
159
- return ssm.StringParameter(
160
- self.scope,
161
- construct_id,
162
- parameter_name=path,
163
- string_value=string_value,
164
- description=description,
165
- type=cdk_param_type
166
- )
148
+ # Handle different value types - use appropriate CDK constructs
149
+ if isinstance(value, list):
150
+ # For list values, use StringListParameter
151
+ return ssm.StringListParameter(
152
+ self.scope,
153
+ construct_id,
154
+ parameter_name=path,
155
+ string_list_value=value,
156
+ description=description
157
+ )
158
+ elif param_type == "SecureString":
159
+ # For secure strings, use L1 CfnParameter with Type=SecureString
160
+ return ssm.CfnParameter(
161
+ self.scope,
162
+ construct_id,
163
+ name=path,
164
+ value=str(value),
165
+ type="SecureString",
166
+ description=description
167
+ )
168
+ else:
169
+ # For regular strings, use StringParameter (no type parameter needed in CDK v2)
170
+ return ssm.StringParameter(
171
+ self.scope,
172
+ construct_id,
173
+ parameter_name=path,
174
+ string_value=str(value),
175
+ description=description
176
+ # Note: 'type' parameter removed - deprecated in CDK v2
177
+ )
167
178
 
168
179
  def _import_enhanced_ssm_parameter(self, path: str, attribute: str) -> Optional[str]:
169
180
  """
@@ -61,35 +61,63 @@ class JsonLoadingUtility:
61
61
  """Resolve references in a configuration section."""
62
62
  if isinstance(section, dict):
63
63
  if self.nested_key in section:
64
- nested_path = str(section.pop(self.nested_key))
65
- # print(f"Resolving parent path: {nested_path}")
66
- if nested_path.endswith(".json"):
67
- nested_root_path = os.path.join(self.base_path, nested_path)
68
- nested_section = self.__load_json_file(nested_root_path)
69
- elif os.path.isdir(os.path.join(self.base_path, nested_path)):
70
- nested_section = []
71
- dir_path = os.path.join(self.base_path, nested_path)
72
- for filename in os.listdir(dir_path):
73
- if filename.endswith(".json"):
74
- file_path = os.path.join(dir_path, filename)
75
- # print(f"Loading file: {file_path}")
76
- file_section = self.__load_json_file(file_path)
77
- nested_section.append(file_section)
78
-
79
- # print("done with nested sections")
80
- else:
81
- nested_section = self.get_nested_config(root_config, nested_path)
82
-
83
- nested_section_resolved = self.resolve_references(
84
- nested_section, root_config
85
- )
86
- if len(section) > 0 and isinstance(nested_section_resolved, dict):
87
- nested_section_resolved.update(section)
88
- elif len(section) > 0 and isinstance(nested_section_resolved, list):
64
+ nested_paths = section.pop(self.nested_key)
65
+
66
+ # Support both single path (string) and multiple paths (list)
67
+ if isinstance(nested_paths, str):
68
+ nested_paths = [nested_paths]
69
+ elif not isinstance(nested_paths, list):
70
+ raise ValueError(f"__inherits__ must be a string or list, got {type(nested_paths)}")
71
+
72
+ # Process each path and merge results
73
+ merged_section = None
74
+
75
+ for nested_path in nested_paths:
76
+ nested_path = str(nested_path)
77
+ # print(f"Resolving parent path: {nested_path}")
78
+
79
+ if nested_path.endswith(".json"):
80
+ nested_root_path = os.path.join(self.base_path, nested_path)
81
+ nested_section = self.__load_json_file(nested_root_path)
82
+ elif os.path.isdir(os.path.join(self.base_path, nested_path)):
83
+ nested_section = []
84
+ dir_path = os.path.join(self.base_path, nested_path)
85
+ for filename in os.listdir(dir_path):
86
+ if filename.endswith(".json"):
87
+ file_path = os.path.join(dir_path, filename)
88
+ # print(f"Loading file: {file_path}")
89
+ file_section = self.__load_json_file(file_path)
90
+ nested_section.append(file_section)
91
+ # print("done with nested sections")
92
+ else:
93
+ nested_section = self.get_nested_config(root_config, nested_path)
94
+
95
+ nested_section_resolved = self.resolve_references(
96
+ nested_section, root_config
97
+ )
98
+
99
+ # Merge resolved sections
100
+ if merged_section is None:
101
+ merged_section = nested_section_resolved
102
+ else:
103
+ # Merge logic based on type
104
+ if isinstance(merged_section, dict) and isinstance(nested_section_resolved, dict):
105
+ self.merge_sections(merged_section, nested_section_resolved)
106
+ elif isinstance(merged_section, list) and isinstance(nested_section_resolved, list):
107
+ merged_section.extend(nested_section_resolved)
108
+ else:
109
+ raise RuntimeError(
110
+ f"Cannot merge incompatible types: {type(merged_section)} and {type(nested_section_resolved)}"
111
+ )
112
+
113
+ # Apply any additional properties from the section
114
+ if len(section) > 0 and isinstance(merged_section, dict):
115
+ merged_section.update(section)
116
+ elif len(section) > 0 and isinstance(merged_section, list):
89
117
  raise RuntimeError("we need to resolve this section")
90
- # nested_section_resolved.append(section)
118
+ # merged_section.append(section)
91
119
 
92
- section = nested_section_resolved
120
+ section = merged_section
93
121
 
94
122
  if isinstance(section, dict):
95
123
  for key, value in section.items():
@@ -0,0 +1 @@
1
+ __version__ = "0.8.2"
@@ -1 +0,0 @@
1
- __version__ = "0.8.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes